From c43bf99629edc04d84a892e1ec94b17b7209520b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Thu, 16 Jun 2022 11:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=9C=E5=9C=BA=20project/resource/resourceT?= =?UTF-8?q?ype/task/taskCate/workHour=20=E5=81=87=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/project/vo/ProjectBaseVO.java | 2 ++ .../controller/admin/project/vo/ProjectExcelVO.java | 2 ++ .../admin/project/vo/ProjectExportReqVO.java | 2 ++ .../controller/admin/project/vo/ProjectPageReqVO.java | 2 ++ .../admin/project/vo/ProjectSearchPageReqVO.java | 2 ++ .../controller/admin/resource/vo/ResourceBaseVO.java | 2 ++ .../controller/admin/resource/vo/ResourceExcelVO.java | 2 ++ .../admin/resource/vo/ResourceExportReqVO.java | 2 ++ .../admin/resource/vo/ResourcePageReqVO.java | 2 ++ .../admin/resourceType/vo/ResourceTypeBaseVO.java | 2 ++ .../admin/resourceType/vo/ResourceTypeExcelVO.java | 2 ++ .../resourceType/vo/ResourceTypeExportReqVO.java | 2 ++ .../admin/resourceType/vo/ResourceTypePageReqVO.java | 1 + .../farm/controller/admin/task/vo/TaskBaseVO.java | 2 ++ .../farm/controller/admin/task/vo/TaskExcelVO.java | 2 ++ .../controller/admin/task/vo/TaskExportReqVO.java | 2 ++ .../farm/controller/admin/task/vo/TaskPageReqVO.java | 2 ++ .../controller/admin/taskCate/vo/TaskCateBaseVO.java | 2 ++ .../controller/admin/taskCate/vo/TaskCateExcelVO.java | 2 ++ .../admin/taskCate/vo/TaskCateExportReqVO.java | 2 ++ .../admin/taskCate/vo/TaskCatePageReqVO.java | 2 ++ .../controller/admin/workHour/vo/WorkHourBaseVO.java | 2 ++ .../controller/admin/workHour/vo/WorkHourExcelVO.java | 2 ++ .../admin/workHour/vo/WorkHourExportReqVO.java | 2 ++ .../admin/workHour/vo/WorkHourPageReqVO.java | 2 ++ .../module/farm/dal/dataobject/project/ProjectDO.java | 3 +++ .../farm/dal/dataobject/resource/ResourceDO.java | 4 ++++ .../dal/dataobject/resourceType/ResourceTypeDO.java | 3 +++ .../yudao/module/farm/dal/dataobject/task/TaskDO.java | 3 +++ .../farm/dal/dataobject/taskCate/TaskCateDO.java | 4 ++++ .../farm/dal/dataobject/workHour/WorkHourDO.java | 4 ++++ .../module/farm/dal/mysql/project/ProjectMapper.java | 2 ++ .../farm/dal/mysql/resource/ResourceMapper.java | 2 ++ .../dal/mysql/resourceType/ResourceTypeMapper.java | 2 ++ .../yudao/module/farm/dal/mysql/task/TaskMapper.java | 2 ++ .../farm/dal/mysql/taskCate/TaskCateMapper.java | 2 ++ .../farm/dal/mysql/workHour/WorkHourMapper.java | 2 ++ .../farm/service/project/ProjectServiceImpl.java | 11 +++++++---- .../farm/service/resource/ResourceServiceImpl.java | 11 +++++++---- .../service/resourceType/ResourceTypeServiceImpl.java | 11 +++++++---- .../module/farm/service/task/TaskServiceImpl.java | 11 +++++++---- .../farm/service/taskCate/TaskCateServiceImpl.java | 11 +++++++---- .../farm/service/workHour/WorkHourServiceImpl.java | 11 +++++++---- 43 files changed, 124 insertions(+), 24 deletions(-) diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java index 2859655e..bbda235c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java @@ -51,4 +51,6 @@ public class ProjectBaseVO { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java index 23c27943..c03445b0 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java @@ -51,4 +51,6 @@ public class ProjectExcelVO { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java index 1b89e435..185dd493 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java @@ -61,4 +61,6 @@ public class ProjectExportReqVO { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java index 9f64ec81..0fed6b10 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java @@ -62,4 +62,6 @@ public class ProjectPageReqVO extends PageParam { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete = false; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java index 9195e371..8eaadf34 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java @@ -68,4 +68,6 @@ public class ProjectSearchPageReqVO extends PageParam { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceBaseVO.java index f623e491..54650eb4 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceBaseVO.java @@ -39,4 +39,6 @@ public class ResourceBaseVO { @ApiModelProperty(value = "唯一占用标识") private Boolean solo; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExcelVO.java index 02524461..0b8c3d3c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExcelVO.java @@ -42,4 +42,6 @@ public class ResourceExcelVO { @ExcelProperty("") private Date createTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExportReqVO.java index a0800293..cac6bf47 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourceExportReqVO.java @@ -52,4 +52,6 @@ public class ResourceExportReqVO { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourcePageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourcePageReqVO.java index db79355c..02368b50 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourcePageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/vo/ResourcePageReqVO.java @@ -54,4 +54,6 @@ public class ResourcePageReqVO extends PageParam { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete = false; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeBaseVO.java index c9755911..197d35d8 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeBaseVO.java @@ -15,4 +15,6 @@ public class ResourceTypeBaseVO { @ApiModelProperty(value = "") private String name; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExcelVO.java index 5e2a1b48..4747d455 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExcelVO.java @@ -23,4 +23,6 @@ public class ResourceTypeExcelVO { @ExcelProperty("") private Date createTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExportReqVO.java index c9c1827a..3f4a1472 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypeExportReqVO.java @@ -23,4 +23,6 @@ public class ResourceTypeExportReqVO { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypePageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypePageReqVO.java index 17f17266..2e88a4a1 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypePageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resourceType/vo/ResourceTypePageReqVO.java @@ -25,4 +25,5 @@ public class ResourceTypePageReqVO extends PageParam { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete = false; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java index 03154d13..bd591843 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java @@ -50,4 +50,6 @@ public class TaskBaseVO { @ApiModelProperty("草稿") private Boolean draft; + + private Boolean pretendDelete; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java index c081babd..37d569bf 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java @@ -54,4 +54,6 @@ public class TaskExcelVO { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java index 471a05b5..156072f3 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java @@ -61,4 +61,6 @@ public class TaskExportReqVO { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java index 6256f0e6..4135b9d8 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java @@ -63,4 +63,6 @@ public class TaskPageReqVO extends PageParam { @ApiModelProperty("草稿") private Boolean draft; + private Boolean pretendDelete = false; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java index 57389b56..c5299589 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java @@ -23,4 +23,6 @@ public class TaskCateBaseVO { @NotNull(message = "不能为空") private String name; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java index e23d3268..4a298e1a 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java @@ -26,4 +26,6 @@ public class TaskCateExcelVO { @ExcelProperty("") private Date createTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java index eab92314..25f2cb22 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java @@ -29,4 +29,6 @@ public class TaskCateExportReqVO { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java index f2ebaa4f..61667288 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java @@ -31,4 +31,6 @@ public class TaskCatePageReqVO extends PageParam { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete = false; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourBaseVO.java index f3e2af18..c235640a 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourBaseVO.java @@ -27,4 +27,6 @@ public class WorkHourBaseVO { @NotNull(message = "不能为空") private Integer hour; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExcelVO.java index 34f87ef5..24e2eead 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExcelVO.java @@ -34,4 +34,6 @@ public class WorkHourExcelVO { @ExcelProperty("") private Date createTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExportReqVO.java index f8e3a85d..a1fc998c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourExportReqVO.java @@ -34,4 +34,6 @@ public class WorkHourExportReqVO { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourPageReqVO.java index 0b88898b..021427e8 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/workHour/vo/WorkHourPageReqVO.java @@ -36,4 +36,6 @@ public class WorkHourPageReqVO extends PageParam { @ApiModelProperty(value = "结束") private Date endCreateTime; + private Boolean pretendDelete = false; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java index 0a28b840..e825cb40 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java @@ -72,4 +72,7 @@ public class ProjectDO extends BaseDO { @ApiModelProperty("草稿") private Boolean draft; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resource/ResourceDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resource/ResourceDO.java index bf4204eb..0ccd7a4f 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resource/ResourceDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resource/ResourceDO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.resource; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; +import io.swagger.annotations.ApiModelProperty; import lombok.*; import java.util.*; import com.baomidou.mybatisplus.annotation.*; @@ -56,4 +57,7 @@ public class ResourceDO extends BaseDO { */ private Boolean solo; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resourceType/ResourceTypeDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resourceType/ResourceTypeDO.java index e72d19e5..efae8d24 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resourceType/ResourceTypeDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/resourceType/ResourceTypeDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.resourceType; +import io.swagger.annotations.ApiModelProperty; import lombok.*; import java.util.*; import com.baomidou.mybatisplus.annotation.*; @@ -29,4 +30,6 @@ public class ResourceTypeDO extends BaseDO { */ private String name; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java index 4fe2761e..b1c11474 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java @@ -76,4 +76,7 @@ public class TaskDO extends BaseDO { @ApiModelProperty("草稿") private Boolean draft; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java index 595b34b7..8adc33ed 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.taskCate; +import io.swagger.annotations.ApiModelProperty; import lombok.*; import java.util.*; import com.baomidou.mybatisplus.annotation.*; @@ -37,4 +38,7 @@ public class TaskCateDO extends BaseDO { */ private String name; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/workHour/WorkHourDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/workHour/WorkHourDO.java index 62ad43fb..b0c5d970 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/workHour/WorkHourDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/workHour/WorkHourDO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.workHour; +import io.swagger.annotations.ApiModelProperty; import lombok.*; import java.util.*; import com.baomidou.mybatisplus.annotation.*; @@ -43,4 +44,7 @@ public class WorkHourDO extends BaseDO { */ private Integer hour; + @ApiModelProperty("假装删除") + private Boolean pretendDelete; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java index 3dbfbffa..2f4266e8 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/project/ProjectMapper.java @@ -30,6 +30,7 @@ public interface ProjectMapper extends BaseMapperX { .betweenIfPresent(ProjectDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime()) .eqIfPresent(ProjectDO::getWeight, reqVO.getWeight()) .betweenIfPresent(ProjectDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ProjectDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ProjectDO::getId)); } @@ -45,6 +46,7 @@ public interface ProjectMapper extends BaseMapperX { .betweenIfPresent(ProjectDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime()) .eqIfPresent(ProjectDO::getWeight, reqVO.getWeight()) .betweenIfPresent(ProjectDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ProjectDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ProjectDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resource/ResourceMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resource/ResourceMapper.java index 1d39857b..75dac79c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resource/ResourceMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resource/ResourceMapper.java @@ -27,6 +27,7 @@ public interface ResourceMapper extends BaseMapperX { .betweenIfPresent(ResourceDO::getValidityEndTime, reqVO.getBeginValidityEndTime(), reqVO.getEndValidityEndTime()) .eqIfPresent(ResourceDO::getSolo, reqVO.getSolo()) .betweenIfPresent(ResourceDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ResourceDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ResourceDO::getId)); } @@ -40,6 +41,7 @@ public interface ResourceMapper extends BaseMapperX { .betweenIfPresent(ResourceDO::getValidityEndTime, reqVO.getBeginValidityEndTime(), reqVO.getEndValidityEndTime()) .eqIfPresent(ResourceDO::getSolo, reqVO.getSolo()) .betweenIfPresent(ResourceDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ResourceDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ResourceDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resourceType/ResourceTypeMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resourceType/ResourceTypeMapper.java index 254be5bd..debe3e5a 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resourceType/ResourceTypeMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/resourceType/ResourceTypeMapper.java @@ -21,6 +21,7 @@ public interface ResourceTypeMapper extends BaseMapperX { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(ResourceTypeDO::getName, reqVO.getName()) .betweenIfPresent(ResourceTypeDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ResourceTypeDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ResourceTypeDO::getId)); } @@ -28,6 +29,7 @@ public interface ResourceTypeMapper extends BaseMapperX { return selectList(new LambdaQueryWrapperX() .likeIfPresent(ResourceTypeDO::getName, reqVO.getName()) .betweenIfPresent(ResourceTypeDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(ResourceTypeDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(ResourceTypeDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/task/TaskMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/task/TaskMapper.java index 07292afd..b316e946 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/task/TaskMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/task/TaskMapper.java @@ -31,6 +31,7 @@ public interface TaskMapper extends BaseMapperX { .betweenIfPresent(TaskDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime()) .eqIfPresent(TaskDO::getWeight, reqVO.getWeight()) .betweenIfPresent(TaskDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(TaskDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(TaskDO::getId)); } @@ -48,6 +49,7 @@ public interface TaskMapper extends BaseMapperX { .betweenIfPresent(TaskDO::getPlanEndTime, reqVO.getBeginPlanEndTime(), reqVO.getEndPlanEndTime()) .eqIfPresent(TaskDO::getWeight, reqVO.getWeight()) .betweenIfPresent(TaskDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(TaskDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(TaskDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java index c1c888f3..6d8e2fa5 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java @@ -23,6 +23,7 @@ public interface TaskCateMapper extends BaseMapperX { .eqIfPresent(TaskCateDO::getProjectId, reqVO.getProjectId()) .likeIfPresent(TaskCateDO::getName, reqVO.getName()) .betweenIfPresent(TaskCateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(TaskCateDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(TaskCateDO::getId)); } @@ -32,6 +33,7 @@ public interface TaskCateMapper extends BaseMapperX { .eqIfPresent(TaskCateDO::getProjectId, reqVO.getProjectId()) .likeIfPresent(TaskCateDO::getName, reqVO.getName()) .betweenIfPresent(TaskCateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(TaskCateDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(TaskCateDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/workHour/WorkHourMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/workHour/WorkHourMapper.java index f20bf4f5..52da7675 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/workHour/WorkHourMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/workHour/WorkHourMapper.java @@ -24,6 +24,7 @@ public interface WorkHourMapper extends BaseMapperX { .eqIfPresent(WorkHourDO::getTaskId, reqVO.getTaskId()) .eqIfPresent(WorkHourDO::getHour, reqVO.getHour()) .betweenIfPresent(WorkHourDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(WorkHourDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(WorkHourDO::getId)); } @@ -34,6 +35,7 @@ public interface WorkHourMapper extends BaseMapperX { .eqIfPresent(WorkHourDO::getTaskId, reqVO.getTaskId()) .eqIfPresent(WorkHourDO::getHour, reqVO.getHour()) .betweenIfPresent(WorkHourDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .eqIfPresent(WorkHourDO::getPretendDelete, reqVO.getPretendDelete()) .orderByDesc(WorkHourDO::getId)); } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java index 95e8b632..d16d8d77 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java @@ -98,15 +98,18 @@ public class ProjectServiceImpl implements ProjectService { @Override public void deleteProject(Long id) { // 校验存在 - this.validateProjectExists(id); + ProjectDO projectDO = this.validateProjectExists(id); // 删除 - projectMapper.deleteById(id); + projectDO.setPretendDelete(true); + projectMapper.updateById(projectDO); } - private void validateProjectExists(Long id) { - if (projectMapper.selectById(id) == null) { + private ProjectDO validateProjectExists(Long id) { + ProjectDO projectDO = projectMapper.selectById(id); + if (projectDO == null) { throw exception(PROJECT_NOT_EXISTS); } + return projectDO; } @Override diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resource/ResourceServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resource/ResourceServiceImpl.java index 76e6abb9..3959664c 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resource/ResourceServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resource/ResourceServiceImpl.java @@ -48,15 +48,18 @@ public class ResourceServiceImpl implements ResourceService { @Override public void deleteResource(Long id) { // 校验存在 - this.validateResourceExists(id); + ResourceDO resourceDO = this.validateResourceExists(id); // 删除 - resourceMapper.deleteById(id); + resourceDO.setPretendDelete(true); + resourceMapper.updateById(resourceDO); } - private void validateResourceExists(Long id) { - if (resourceMapper.selectById(id) == null) { + private ResourceDO validateResourceExists(Long id) { + ResourceDO resourceDO = resourceMapper.selectById(id); + if (resourceDO == null) { throw exception(RESOURCE_NOT_EXISTS); } + return resourceDO; } @Override diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resourceType/ResourceTypeServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resourceType/ResourceTypeServiceImpl.java index ef25cc36..9661b462 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resourceType/ResourceTypeServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/resourceType/ResourceTypeServiceImpl.java @@ -48,15 +48,18 @@ public class ResourceTypeServiceImpl implements ResourceTypeService { @Override public void deleteResourceType(Long id) { // 校验存在 - this.validateResourceTypeExists(id); + ResourceTypeDO resourceTypeDO = this.validateResourceTypeExists(id); // 删除 - resourceTypeMapper.deleteById(id); + resourceTypeDO.setPretendDelete(true); + resourceTypeMapper.updateById(resourceTypeDO); } - private void validateResourceTypeExists(Long id) { - if (resourceTypeMapper.selectById(id) == null) { + private ResourceTypeDO validateResourceTypeExists(Long id) { + ResourceTypeDO resourceTypeDO = resourceTypeMapper.selectById(id); + if (resourceTypeDO == null) { throw exception(RESOURCE_TYPE_NOT_EXISTS); } + return resourceTypeDO; } @Override diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java index 57ba82a7..d8822f09 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java @@ -96,15 +96,18 @@ public class TaskServiceImpl implements TaskService { @Override public void deleteTask(Long id) { // 校验存在 - this.validateTaskExists(id); + TaskDO taskDO = this.validateTaskExists(id); // 删除 - taskMapper.deleteById(id); + taskDO.setPretendDelete(true); + taskMapper.updateById(taskDO); } - private void validateTaskExists(Long id) { - if (taskMapper.selectById(id) == null) { + private TaskDO validateTaskExists(Long id) { + TaskDO taskDO = taskMapper.selectById(id); + if (taskDO == null) { throw exception(TASK_NOT_EXISTS); } + return taskDO; } @Override diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImpl.java index 1f4b53fd..c759c98a 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImpl.java @@ -48,15 +48,18 @@ public class TaskCateServiceImpl implements TaskCateService { @Override public void deleteTaskCate(Long id) { // 校验存在 - this.validateTaskCateExists(id); + TaskCateDO taskCateDO = this.validateTaskCateExists(id); // 删除 - taskCateMapper.deleteById(id); + taskCateDO.setPretendDelete(true); + taskCateMapper.updateById(taskCateDO); } - private void validateTaskCateExists(Long id) { - if (taskCateMapper.selectById(id) == null) { + private TaskCateDO validateTaskCateExists(Long id) { + TaskCateDO taskCateDO = taskCateMapper.selectById(id) ; + if (taskCateDO == null) { throw exception(TASK_CATE_NOT_EXISTS); } + return taskCateDO; } @Override diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/workHour/WorkHourServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/workHour/WorkHourServiceImpl.java index 964cca36..cc6f9786 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/workHour/WorkHourServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/workHour/WorkHourServiceImpl.java @@ -70,15 +70,18 @@ public class WorkHourServiceImpl implements WorkHourService { @Override public void deleteWorkHour(Long id) { // 校验存在 - this.validateWorkHourExists(id); + WorkHourDO workHourDO = this.validateWorkHourExists(id); // 删除 - workHourMapper.deleteById(id); + workHourDO.setPretendDelete(true); + workHourMapper.updateById(workHourDO); } - private void validateWorkHourExists(Long id) { - if (workHourMapper.selectById(id) == null) { + private WorkHourDO validateWorkHourExists(Long id) { + WorkHourDO workHourDO = workHourMapper.selectById(id); + if (workHourDO == null) { throw exception(WORK_HOUR_NOT_EXISTS); } + return workHourDO; } @Override