| | |
| | | } |
| | | dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); |
| | | //新增部门 |
| | | deptMapper.insertDept(dept); |
| | | return insertDeptMenu(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) |
| | |
| | | { |
| | | return getChildList(list, t).size() > 0 ? true : false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description 通过微信部门id获取部门 |
| | | * @author jqs |
| | | * @date 2023/8/17 16:21 |
| | | * @param wxDeptId |
| | | * @return SysDept |
| | | */ |
| | | @Override |
| | | public SysDept getByWxDeptId(Long wxDeptId){ |
| | | return deptMapper.getByWxDeptId(wxDeptId); |
| | | } |
| | | } |