新增 小程序查询 我的任务 未完成的数量

This commit is contained in:
furongxin 2024-05-31 10:40:01 +08:00
parent 860b2a377c
commit 7f592dcdf4
4 changed files with 28 additions and 0 deletions

View File

@ -120,4 +120,12 @@ public class BpmOAWorkTaskController {
return success(pageResult);
}
@GetMapping("/my-page-count")
@Operation(summary = "获得我的任务的数量")
@DataPermission(enable = false)
public CommonResult<Long> getMyPageCount() {
return success(workTaskService.getMyPageCount(getLoginUserId()));
}
}

View File

@ -43,4 +43,11 @@ public interface BpmOAWorkTaskMapper extends BaseMapperX<BpmOAWorkTaskDO> {
.eq(BpmOAWorkTaskDO::getReceiverUserId, userId)
.orderByDesc(BpmOAWorkTaskDO::getId));
}
default Long selectMyPageCount(Long userId) {
return selectCount(new LambdaQueryWrapperX<BpmOAWorkTaskDO>()
.eq(BpmOAWorkTaskDO::getReceiverUserId, userId)
.ne(BpmOAWorkTaskDO::getWorkTaskStatus, 3));
}
}

View File

@ -75,4 +75,11 @@ public interface BpmOAWorkTaskService {
* @return 任务分配分页
*/
PageResult<BpmOAWorkTaskRespVO> getMyPage(Long loginUserId, BpmOAWorkTaskPageReqVO pageVO);
/**
* 获得 我的任务数量
* @param userId 用户编号
* @return 数量
*/
Long getMyPageCount(Long userId);
}

View File

@ -225,4 +225,10 @@ public class BpmOAWorkTaskServiceImpl extends BpmOABaseService implements BpmOAW
return dataPage;
}
@Override
public Long getMyPageCount(Long userId) {
return workTaskMapper.selectMyPageCount(userId);
}
}