From fabd08d87d00bfdf1aacf473fd905fdd3c903ed3 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期五, 02 九月 2022 10:10:14 +0800
Subject: [PATCH] Merge branches 'genchuang' and 'master' of https://sinanoaq.cn:8888/r/safePlatform-out into genchuang

---
 goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java
index 9252a7e..46c29c6 100644
--- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java
+++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/TargetDutyfileInfoController.java
@@ -1,4 +1,5 @@
 package com.gkhy.safePlatform.targetDuty.controller;
+import java.util.ArrayList;
 import java.util.Date;
 
 
@@ -52,7 +53,7 @@
 		PageUtils.checkCheck(pageQuery);
 		return this.targetDutyfileInfoService.queryAll(pageQuery);
     }
-
+	
 
     /**
      * 通过主键查询单条数据
@@ -87,11 +88,21 @@
      * @param ids 主键结合
      * @return 删除结果
      */
-    @GetMapping(value = "/delete")
-    public ResultVO delete(String ids) {
-	List<String> idList = Arrays.stream(ids.split(","))
-                .collect(Collectors.toList());
-        this.targetDutyfileInfoService.removeByIds(idList);
+    @RequestMapping(value = "/delete",method = RequestMethod.POST)
+    public ResultVO delete(@RequestBody Long[] ids) {
+        if(ids == null){
+            return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL);
+        }
+        List<Long> idList = Arrays.asList(ids);
+
+        List<TargetDutyfileInfo> delList = new ArrayList<>();
+        idList.forEach(f->{
+            TargetDutyfileInfo info = new TargetDutyfileInfo();
+            info.setDelFlag(1);
+            info.setId(f);
+            delList.add(info);
+        });
+        this.targetDutyfileInfoService.updateBatchById(delList);
         return new ResultVO<>(ResultCodes.OK);
     }
 
@@ -106,4 +117,4 @@
 
 
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.2