| | |
| | | import org.dromara.system.domain.vo.SysUserVo; |
| | | import org.dromara.system.mapper.*; |
| | | import org.dromara.system.service.ISysUserService; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | @CacheEvict(cacheNames = CacheNames.SYS_NICKNAME, key = "#user.userId") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int updateUser(SysUserBo user) { |
| | | // 新增用户与角色管理 |
| | |
| | | * @param user 用户信息 |
| | | * @return 结果 |
| | | */ |
| | | @CacheEvict(cacheNames = CacheNames.SYS_NICKNAME, key = "#user.userId") |
| | | @Override |
| | | public int updateUserProfile(SysUserBo user) { |
| | | return baseMapper.update(null, |
| | |
| | | if (CollUtil.isEmpty(userIds)) { |
| | | return List.of(); |
| | | } |
| | | List<SysUserVo> list = this.selectUserByIds(userIds, null); |
| | | List<SysUserVo> list = baseMapper.selectVoList(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getUserId, SysUser::getUserName, SysUser::getNickName) |
| | | .eq(SysUser::getStatus, UserConstants.USER_NORMAL) |
| | | .in(CollUtil.isNotEmpty(userIds), SysUser::getUserId, userIds)); |
| | | return BeanUtil.copyToList(list, UserDTO.class); |
| | | } |
| | | |