Browse Source

🚑 优化租户部门操作逻辑

test
smallchill 5 years ago
parent
commit
82169faefd
  1. 2
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java

2
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java

@ -79,7 +79,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
if (dept.getParentId() > 0) {
Dept parent = getById(dept.getParentId());
if (Func.toLong(dept.getParentId()) == Func.toLong(dept.getId())) {
throw new ServiceException("父节点不选择自身!");
throw new ServiceException("父节点不选择自身!");
}
dept.setTenantId(parent.getTenantId());
String ancestors = parent.getAncestors() + StringPool.COMMA + dept.getParentId();

Loading…
Cancel
Save