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