|
|
@ -197,10 +197,11 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme |
|
|
|
vo.setEmail(vo.getPhone()); |
|
|
|
vo.setEmail(vo.getPhone()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//删除所有部门
|
|
|
|
|
|
|
|
userDeptMapper.delete(Wrappers.<UserDept>lambdaQuery().eq(UserDept::getUserId, vo.getId())); |
|
|
|
|
|
|
|
//更新部门
|
|
|
|
//更新部门
|
|
|
|
if (!CollectionUtils.isEmpty(vo.getDeptArchitectureId())) { |
|
|
|
if (!CollectionUtils.isEmpty(vo.getDeptArchitectureId())) { |
|
|
|
|
|
|
|
//删除所有部门
|
|
|
|
|
|
|
|
userDeptMapper.delete(Wrappers.<UserDept>lambdaQuery().eq(UserDept::getUserId, vo.getId())); |
|
|
|
|
|
|
|
|
|
|
|
List<Integer> deptArchitectureId = vo.getDeptArchitectureId(); |
|
|
|
List<Integer> deptArchitectureId = vo.getDeptArchitectureId(); |
|
|
|
for (Integer deptId : deptArchitectureId) { |
|
|
|
for (Integer deptId : deptArchitectureId) { |
|
|
|
UserDept userDept = new UserDept(); |
|
|
|
UserDept userDept = new UserDept(); |
|
|
@ -210,10 +211,12 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(vo.getRoleIds())) { |
|
|
|
LambdaQueryWrapper<SysUserRole> queryWrapper = Wrappers.lambdaQuery(); |
|
|
|
LambdaQueryWrapper<SysUserRole> queryWrapper = Wrappers.lambdaQuery(); |
|
|
|
queryWrapper.eq(SysUserRole::getUserId, vo.getId()); |
|
|
|
queryWrapper.eq(SysUserRole::getUserId, vo.getId()); |
|
|
|
userRoleService.remove(queryWrapper); |
|
|
|
userRoleService.remove(queryWrapper); |
|
|
|
if (!CollectionUtils.isEmpty(vo.getRoleIds())) { |
|
|
|
|
|
|
|
UserRoleOperationReqVO reqVO = new UserRoleOperationReqVO(); |
|
|
|
UserRoleOperationReqVO reqVO = new UserRoleOperationReqVO(); |
|
|
|
reqVO.setUserId(vo.getId()); |
|
|
|
reqVO.setUserId(vo.getId()); |
|
|
|
reqVO.setRoleIds(vo.getRoleIds()); |
|
|
|
reqVO.setRoleIds(vo.getRoleIds()); |
|
|
|