工作流的 code review

pull/2/head
YunaiV 2021-11-15 06:25:25 +08:00
parent 91c0c423c0
commit 9dc7d2d197
3 changed files with 5 additions and 10 deletions

View File

@ -15,6 +15,7 @@ public interface BpmErrorCodeConstants {
// ========== OA 流程模块 1-003-001-000 ==========
// TODO @jason前缀
ErrorCode LEAVE_NOT_EXISTS = new ErrorCode(1003001001, "请假申请不存在");
ErrorCode PM_POST_NOT_EXISTS = new ErrorCode(1003001002, "项目经理岗位未设置");
ErrorCode DEPART_PM_POST_NOT_EXISTS = new ErrorCode(1003001003, "部门的项目经理不存在");
@ -23,6 +24,4 @@ public interface BpmErrorCodeConstants {
ErrorCode HR_POST_NOT_EXISTS = new ErrorCode(1003001006, "HR岗位未设置");
ErrorCode DAY_LEAVE_ERROR = new ErrorCode(1003001007, "请假天数必须>=1");
}

View File

@ -3,7 +3,6 @@ package cn.iocoder.yudao.adminserver.modules.bpm.service.workflow;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@ -17,14 +16,12 @@ public interface BpmTaskService {
*/
PageResult<TodoTaskRespVO> getTodoTaskPage(TodoTaskPageReqVO pageReqVO);
/**
*
* @param taskId id
*/
void claimTask(String taskId);
/**
* userTask, 1variables). 2. (comment)
* variables

View File

@ -1,21 +1,19 @@
package cn.iocoder.yudao.adminserver.modules.system.dal.mysql.user;
import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserBaseVO;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserExportReqVO;
import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserPageReqVO;
import cn.iocoder.yudao.coreservice.modules.system.dal.dataobject.user.SysUserDO;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserExportReqVO;
import cn.iocoder.yudao.adminserver.modules.system.controller.user.vo.user.SysUserPageReqVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.logging.log4j.util.Strings;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
@Mapper
public interface SysUserMapper extends BaseMapperX<SysUserDO> {
@ -62,6 +60,7 @@ public interface SysUserMapper extends BaseMapperX<SysUserDO> {
return selectList(new QueryWrapperX<SysUserDO>()
.eq("status", CommonStatusEnum.ENABLE.getStatus())
.eq("dept_id", departId)
// TODO @jason: 封装一个 StringUtils .toString 。如果空的时候,设置为 null。会更简洁
.likeIfPresent("post_ids", Optional.ofNullable(postId).map(t -> String.valueOf(postId)).orElse("")));
}