|
@@ -63,7 +63,7 @@ public class TmDepartmentServiceImpl extends ServiceImpl<ITmDepartmentMapper, Tm
|
|
|
if(!checkDeptNameUnique(dept.getName(),dept.getId())){
|
|
|
throw new BusinessException(ResultCode.DEPT_NAME_EXITS);
|
|
|
}
|
|
|
- if(!dept.getId().equals(dept.getParentId())){
|
|
|
+ if(dept.getId().equals(dept.getParentId())){
|
|
|
throw new BusinessException(ResultCode.DEPT_EDIT_ERROR);
|
|
|
}
|
|
|
List<TmDepartment> sonByDeptId = this.getSonByDeptId(dept.getId());
|