Pre Merge pull request !580 from dhb52/dev

This commit is contained in:
dhb52 2024-08-27 16:17:37 +00:00 committed by Gitee
commit e000c41403
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,7 @@ public class SysClientServiceImpl implements ISysClientService {
/**
* 查询客户端管理
*/
@Cacheable(cacheNames = CacheNames.SYS_CLIENT, key = "#clientId")
@Cacheable(cacheNames = CacheNames.SYS_CLIENT, key = "#clientId", unless = "#result == null")
@Override
public SysClientVo queryByClientId(String clientId) {
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysClient>().eq(SysClient::getClientId, clientId));

View File

@ -67,7 +67,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
* @param configKey 参数key
* @return 参数键值
*/
@Cacheable(cacheNames = CacheNames.SYS_CONFIG, key = "#configKey")
@Cacheable(cacheNames = CacheNames.SYS_CONFIG, key = "#configKey", unless = "#result == null")
@Override
public String selectConfigByKey(String configKey) {
SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>()

View File

@ -127,7 +127,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @param deptId 部门ID
* @return 部门信息
*/
@Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId")
@Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId", unless = "#result == null")
@Override
public SysDeptVo selectDeptById(Long deptId) {
SysDeptVo dept = baseMapper.selectVoById(deptId);

View File

@ -94,7 +94,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
* @param dictType 字典类型
* @return 字典数据集合信息
*/
@Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType")
@Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType", unless = "#result == null")
@Override
public List<SysDictDataVo> selectDictDataByType(String dictType) {
List<SysDictDataVo> dictDatas = dictDataMapper.selectDictDataByType(dictType);

View File

@ -155,7 +155,7 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
* @param ossId 文件在数据库中的唯一标识
* @return SysOssVo 对象包含文件信息
*/
@Cacheable(cacheNames = CacheNames.SYS_OSS, key = "#ossId")
@Cacheable(cacheNames = CacheNames.SYS_OSS, key = "#ossId", unless = "#result == null")
@Override
public SysOssVo getById(Long ossId) {
return baseMapper.selectVoById(ossId);

View File

@ -66,7 +66,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
/**
* 基于租户ID查询租户
*/
@Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId")
@Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId", unless = "#result == null")
@Override
public SysTenantVo queryByTenantId(String tenantId) {
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysTenant>().eq(SysTenant::getTenantId, tenantId));

View File

@ -562,7 +562,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
* @param userId 用户ID
* @return 用户账户
*/
@Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId")
@Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId", unless = "#result == null")
@Override
public String selectUserNameById(Long userId) {
SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
@ -577,7 +577,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
* @return 用户账户
*/
@Override
@Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId")
@Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId", unless = "#result == null")
public String selectNicknameById(Long userId) {
SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>()
.select(SysUser::getNickName).eq(SysUser::getUserId, userId));