From d015cc0b48ca51a2b93b6c60c91dc352a104b1e7 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期一, 23 九月 2024 10:41:50 +0800
Subject: [PATCH] 删除密码加密

---
 goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java
index 7e0979c..71d034e 100644
--- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java
+++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/ExamineTemplateController.java
@@ -7,6 +7,7 @@
 import com.gkhy.safePlatform.commons.utils.PageUtils;
 import com.gkhy.safePlatform.commons.vo.ResultVO;
 import com.gkhy.safePlatform.targetDuty.entity.ExamineItem;
+import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate;
 import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria;
 import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate;
 import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService;
@@ -17,6 +18,7 @@
 
 import javax.annotation.Resource;
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
@@ -67,16 +69,7 @@
      */
     @PostMapping(value = "/addOrUpdate")
     public ResultVO update(Authentication authentication, @RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) {
-        if(!StringUtils.hasText(examineTemplateSaveOrUpdate.getTitle())){
-            return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少title");
-        }
-        // 获取当前用户
-        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
-
-        //设置设定人ID和设定人部门ID
-        examineTemplateSaveOrUpdate.setSetPersonDepartmentId(currentUser.getDepId());
-        examineTemplateSaveOrUpdate.setSetPersonId(currentUser.getUid());
-        examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate);
+        examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate,authentication);
         return new ResultVO<>(ResultCodes.OK);
     }
 
@@ -88,11 +81,7 @@
      */
     @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);
-        this.examineTemplateService.removeByIds(idList);
+        this.examineTemplateService.delete(ids);
         return new ResultVO<>(ResultCodes.OK);
     }
 

--
Gitblit v1.9.2