部门相关代码提交
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
SELECT sys_dept.pids pids
|
||||
FROM sys_dept sys_dept
|
||||
WHERE sys_dept.id = #{id}
|
||||
and sys_dept.state = 1
|
||||
</select>
|
||||
|
||||
<select id="getDeptTree" resultType="DeptTreeVO">
|
||||
|
||||
@@ -90,13 +90,17 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
BeanUtil.copyProperties(deptParam, dept);
|
||||
//进行先解绑,再新增
|
||||
Integer httpResult = deptLineFeignClient.removeBind(deptParam.getPid()).getData();
|
||||
System.out.println(httpResult);
|
||||
|
||||
if (deptParam.getPid().equals("-1")) {
|
||||
//上层节点
|
||||
dept.setPids("0");
|
||||
} else {
|
||||
String pids = "," + deptParam.getPid();
|
||||
String pid = this.baseMapper.getIdString(deptParam.getPid());
|
||||
if(StrUtil.isBlank(deptParam.getPid())){
|
||||
throw new BusinessException(UserResponseEnum.DEPT_PID_EXCEPTION);
|
||||
}
|
||||
|
||||
//上层节点
|
||||
dept.setPids(pid + pids);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user