This commit is contained in:
2025-03-09 20:15:50 +08:00
parent 6cfa7d7528
commit dfb195255b
9 changed files with 74 additions and 39 deletions

View File

@@ -99,4 +99,11 @@ public interface SysUserMapper extends BaseMapperPlus<SysUserMapper, SysUser, Sy
* @return
*/
SysUser selectUserByIdAndNotDelFlag(Long userId);
/**
* 查询基本数据
* @return
*/
List<SysUser> selectListAndNotDel();
}

View File

@@ -227,4 +227,10 @@ public interface ISysUserService {
*/
int deleteUserByIds(Long[] userIds);
/**
* 查找所有没有被删除的用户的基本信息
* @return
*/
List<SysUser> selectUserList2();
}

View File

@@ -34,6 +34,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -487,6 +488,12 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
return baseMapper.deleteBatchIds(ids);
}
@Override
public List<SysUser> selectUserList2() {
return baseMapper.selectListAndNotDel();
}
@Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
@Override
public String selectUserNameById(Long userId) {