Browse Source

项目、任务查看未删除的

zyh
小久哥 3 years ago
parent
commit
4e8c2178ba
  1. 1
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java
  2. 3
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java

1
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java

@ -148,6 +148,7 @@ public class ProjectServiceImpl implements ProjectService {
LambdaQueryWrapperX<ProjectDO> queryWrapperX = new LambdaQueryWrapperX<>(); LambdaQueryWrapperX<ProjectDO> queryWrapperX = new LambdaQueryWrapperX<>();
queryWrapperX.eqIfPresent(ProjectDO::getState, pageDTO.getState()); queryWrapperX.eqIfPresent(ProjectDO::getState, pageDTO.getState());
queryWrapperX.likeIfPresent(ProjectDO::getName, pageDTO.getProjectName()); queryWrapperX.likeIfPresent(ProjectDO::getName, pageDTO.getProjectName());
queryWrapperX.eq(ProjectDO::getPretendDelete, false);
if (ObjectUtil.isNotEmpty(pageDTO.getTimeLimit())){ if (ObjectUtil.isNotEmpty(pageDTO.getTimeLimit())){
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
LocalDateTime startTime = pageDTO.getTimeLimit() == 2 ? nowTime.minusDays(3) : nowTime.minusDays(14); LocalDateTime startTime = pageDTO.getTimeLimit() == 2 ? nowTime.minusDays(3) : nowTime.minusDays(14);

3
zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java

@ -192,8 +192,7 @@ public class TaskServiceImpl implements TaskService {
public R<PageVO<TaskDetailDTO>> apiGetTaskPage(TaskPageDTO pageDTO){ public R<PageVO<TaskDetailDTO>> apiGetTaskPage(TaskPageDTO pageDTO){
PageUtil.startPage(pageDTO); PageUtil.startPage(pageDTO);
LambdaQueryWrapperX<TaskDO> lambdaQueryWrapperX = new LambdaQueryWrapperX<>(); List<TaskDO> taskDOList = taskMapper.selectList(TaskDO::getPretendDelete, false);
List<TaskDO> taskDOList = taskMapper.selectList(lambdaQueryWrapperX);
List<TaskDetailDTO> taskList = BeanUtil.copyToList(taskDOList, TaskDetailDTO.class); List<TaskDetailDTO> taskList = BeanUtil.copyToList(taskDOList, TaskDetailDTO.class);
PageVO<TaskDetailDTO> pageVO = PageUtil.convertPageInfo(taskList); PageVO<TaskDetailDTO> pageVO = PageUtil.convertPageInfo(taskList);
return R.success(pageVO); return R.success(pageVO);

Loading…
Cancel
Save