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/TargetDutyfileInfoController.java | 23 +++++++---------------- 1 files changed, 7 insertions(+), 16 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 46c29c6..cc1d71e 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 @@ -12,6 +12,7 @@ import com.gkhy.safePlatform.targetDuty.entity.TargetDutyfileInfo; import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailSaveOrUpdate; import com.gkhy.safePlatform.targetDuty.service.TargetDutyfileInfoService; +import com.gkhy.safePlatform.targetDuty.service.baseService.TargetDutyfileInfoBaseService; import com.google.common.collect.Lists; import org.springframework.web.bind.annotation.*; import com.gkhy.safePlatform.commons.query.PageQuery; @@ -41,6 +42,8 @@ */ @Resource private TargetDutyfileInfoService targetDutyfileInfoService; + @Resource + private TargetDutyfileInfoBaseService targetDutyfileInfoBaseService; /** * 分页查询所有数据 @@ -63,7 +66,7 @@ */ @GetMapping(value = "/selectOne/{id}") public ResultVO selectOne(@PathVariable Serializable id) { - return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoService.getById(id)); + return new ResultVO<>(ResultCodes.OK,this.targetDutyfileInfoBaseService.getById(id)); } /** @@ -75,9 +78,9 @@ @PostMapping(value = "/addOrUpdate") public ResultVO update(@RequestBody TargetDutyfileInfo targetDutyfileInfo) { if (targetDutyfileInfo.getId() == null) { - return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoService.save(targetDutyfileInfo)); + return new ResultVO<>(ResultCodes.OK,targetDutyfileInfoBaseService.save(targetDutyfileInfo)); } else { - targetDutyfileInfoService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); + targetDutyfileInfoBaseService.update(targetDutyfileInfo,new UpdateWrapper<TargetDutyfileInfo>().eq("id",targetDutyfileInfo.getId())); return new ResultVO<>(ResultCodes.OK); } } @@ -90,19 +93,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); - - 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); + this.targetDutyfileInfoService.delete(ids); return new ResultVO<>(ResultCodes.OK); } -- Gitblit v1.9.2