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

---
 equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java
index f5973a5..35aed3c 100644
--- a/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java
+++ b/equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/controller/KeypointEquipmentInfoController.java
@@ -62,10 +62,10 @@
      */
     @PostMapping(value = "/page/list")
     public ResultVO selectAll(@RequestBody PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery){
-		PageUtils.checkCheck(pageQuery);
+        PageUtils.checkCheck(pageQuery);
 		return this.keypointEquipmentInfoService.queryAll(pageQuery);
     }
-
+	
 
     /**
      * 通过主键查询单条数据
@@ -100,11 +100,21 @@
      * @param ids 主键结合
      * @return 删除结果
      */
-    @GetMapping(value = "/delete")
-    public ResultVO delete(String ids) {
-	List<String> idList = Arrays.stream(ids.split(","))
-                .collect(Collectors.toList());
-        this.keypointEquipmentInfoService.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<KeypointEquipmentInfo> delList = new ArrayList<>();
+        idList.forEach(f->{
+            KeypointEquipmentInfo info = new KeypointEquipmentInfo();
+            info.setDelFlag(1);
+            info.setId(f);
+            delList.add(info);
+        });
+        this.keypointEquipmentInfoService.updateBatchById(delList);
         return new ResultVO<>(ResultCodes.OK);
     }
 
@@ -286,4 +296,4 @@
 
 
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.2