From b854d8d7604329dcf99584d15f83ff02076d9e07 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: Thu, 01 Sep 2022 10:52:04 +0800
Subject: [PATCH] 假删除fix
---
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java
index df7b055..482e4ec 100644
--- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java
+++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java
@@ -7,7 +7,9 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gkhy.safePlatform.commons.utils.BeanCopyUtils;
import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail;
+import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto;
+import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailExcel;
import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentDetailService;
import com.gkhy.safePlatform.targetDuty.utils.DateUtils;
@@ -71,7 +73,8 @@
*/
@GetMapping(value = "/selectOne/{id}")
public ResultVO selectOne(@PathVariable Serializable id) {
- return new ResultVO<>(ResultCodes.OK,this.rewardPunishmentDetailService.getById(id));
+ RewardPunishmentDetailDto mngDto = this.rewardPunishmentDetailService.selectOne(id);
+ return new ResultVO<>(ResultCodes.OK,mngDto);
}
/**
@@ -99,6 +102,7 @@
// list.add(new1);
// });
if (rewardPunishmentDetail.getId() == null) {
+ rewardPunishmentDetail.setCreateTime(new Date());
return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail));
} else {
rewardPunishmentDetailService.updateById(rewardPunishmentDetail);
@@ -118,7 +122,15 @@
return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL);
}
List<Long> idList = Arrays.asList(ids);
- this.rewardPunishmentDetailService.removeByIds(idList);
+
+ List<RewardPunishmentDetail> delList = new ArrayList<>();
+ idList.forEach(f->{
+ RewardPunishmentDetail info = new RewardPunishmentDetail();
+ info.setDelFlag(1);
+ info.setId(f);
+ delList.add(info);
+ });
+ this.rewardPunishmentDetailService.updateBatchById(delList);
return new ResultVO<>(ResultCodes.OK);
}
--
Gitblit v1.9.2