| | |
| | | } |
| | | dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); |
| | | //新增部门 |
| | | deptMapper.insertDept(dept); |
| | | int i = deptMapper.insertDept(dept); |
| | | if(dept.getMenuIds()!=null||dept.getStaffMenuIds()!=null){ |
| | | return insertDeptMenu(dept); |
| | | }else{ |
| | | return i; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | SysDeptMenu rm = new SysDeptMenu(); |
| | | rm.setDeptId(dept.getDeptId()); |
| | | rm.setMenuId(menuId); |
| | | rm.setMenuFrom(1); |
| | | list.add(rm); |
| | | } |
| | | for(Long menuId : dept.getStaffMenuIds()){ |
| | | SysDeptMenu rm = new SysDeptMenu(); |
| | | rm.setDeptId(dept.getDeptId()); |
| | | rm.setMenuId(menuId); |
| | | rm.setMenuFrom(2); |
| | | list.add(rm); |
| | | } |
| | | if (list.size() > 0) |