Commit 5e632cd5 authored by cq990612's avatar cq990612

优化代码结构

parent 5c2d62da
......@@ -29,4 +29,6 @@ public interface WorkDeptService {
Boolean updateManagerIdISNullById(Integer id);
Boolean updateById(WorkDept workDept);
List<WorkDept> getDeptByManagerId(Integer userId);
}
......@@ -87,4 +87,17 @@ public class WorkDeptServiceImpl implements WorkDeptService {
int i = workDeptMapper.updateById(workDept);
return i>0;
}
@Override
public List<WorkDept> getDeptByManagerId(Integer userId) {
log.info("WorkDeptServiceImpl[]getDeptByManagerId[]input.param.userId:{}" + userId);
if (null == userId) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}
List<WorkDept> workDeptList = workDeptMapper.getDeptByManagerId(userId);
if (CollectionUtils.isEmpty(workDeptList)) {
return null;
}
return workDeptList;
}
}
......@@ -408,7 +408,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_PROJECT_IS_NULL);
}
for (WorkProject workProject : workProjects) {
if (workProject.getOaProjectId().equals(createProjectVo.getOaProjectId())) {
if (createProjectVo.getOaProjectId().equals(workProject.getOaProjectId())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.ITEMOADUPLICATE);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment