|
|
@@ -86,7 +86,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
}
|
|
|
if (req.getStatus().equals(StatusEnum.NO.getValue()) &&
|
|
|
this.list(Wrappers.lambdaQuery(SysDept.class)
|
|
|
- .eq(SysDept::getStatus, StatusEnum.YES.getValue())
|
|
|
+ .eq(SysDept::getStatus, StatusEnum.YES)
|
|
|
.apply("find_in_set({0}, ancestors)", req.getId())).size() > 0) {
|
|
|
throw new CustomException("该部门存在未停用的下级部门");
|
|
|
}
|
|
|
@@ -110,7 +110,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|
|
List<SysDept> parentList = Arrays.asList(entity.getAncestors().split(",")).stream().map(item -> {
|
|
|
SysDept sysDeptTemp = new SysDept();
|
|
|
sysDeptTemp.setId(Long.parseLong(item));
|
|
|
- sysDeptTemp.setStatus(StatusEnum.YES.getValue());
|
|
|
+ sysDeptTemp.setStatus(StatusEnum.YES);
|
|
|
return sysDeptTemp;
|
|
|
}).collect(Collectors.toList());
|
|
|
this.updateBatchById(parentList);
|