From 0bacf3efe14dc146df1959fd935da6c748722487 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Fri, 7 Jul 2023 16:59:20 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E8=AE=BE=E5=A4=87=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzinfo/inspect/obj/web/ContentController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java index fbd0691..76ee5ec 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java @@ -1,5 +1,7 @@ package com.hnac.hzinfo.inspect.obj.web; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -7,6 +9,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzinfo.inspect.obj.dto.ContentDTO; import com.hnac.hzinfo.inspect.obj.entity.ContentEntity; import com.hnac.hzinfo.inspect.obj.entity.ProjectContentEntity; import com.hnac.hzinfo.inspect.obj.services.ProjectContentService; @@ -23,6 +26,7 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; +import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -115,4 +119,11 @@ public class ContentController { contentService.databaseCopyBatch(Func.toLongList(ids), pre); return R.success("操作成功"); } + + @PutMapping("/updateBatch") + @ApiOperation(value = "根据ids 数据库批量复制", notes = "传入id集合") + public R updateBatch(@RequestBody List contentList) { + List contentEntityList = JSONArray.parseArray(JSON.toJSONString(contentList), ContentEntity.class); + return R.status(contentService.updateBatchById(contentEntityList)); + } }