Browse Source

1、修改updateDeptChildren方法

develop
bobol 5 months ago
parent
commit
977e7048c4
  1. 6
      lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java

6
lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java

@ -322,6 +322,9 @@ public class SysDeptServiceImpl implements ISysDeptService {
* @param oldAncestors 旧的父ID集合
*/
public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors, String newAllName, String oldAllName) {
if (null == oldAllName) {
oldAllName = "";
}
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId);
for (SysDept child : children) {
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
@ -341,6 +344,9 @@ public class SysDeptServiceImpl implements ISysDeptService {
* @param newAllName 新的父ID集合
*/
public void updateDeptChildrenNew(Long deptId, String newAllName, String oldAllName) {
if (null == oldAllName) {
oldAllName = "";
}
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId);
for (SysDept child : children) {
if (!StringUtils.isEmpty(child.getAllName())) {

Loading…
Cancel
Save