|
|
@@ -269,7 +269,12 @@ public class SysDeptServiceImpl implements ISysDeptService {
|
|
|
// bo.setOrderNum(orderNum + 1);
|
|
|
//}
|
|
|
SysDept dept = MapstructUtils.convert(bo, SysDept.class);
|
|
|
- dept.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + dept.getParentId());
|
|
|
+ if (ObjectUtil.isNotEmpty(info)) {
|
|
|
+ dept.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + dept.getParentId());
|
|
|
+ } else {
|
|
|
+ dept.setAncestors(dept.getParentId().toString());
|
|
|
+ }
|
|
|
+
|
|
|
int count = baseMapper.insert(dept);
|
|
|
if (count > 0) {
|
|
|
bo.setDeptId(dept.getDeptId());
|