清空所有客户端缓存

This commit is contained in:
2025-07-02 14:16:11 +08:00
parent a69aad227a
commit a487e7ae67
6 changed files with 46 additions and 40 deletions

View File

@ -54,6 +54,7 @@ public class SysClientServiceImpl implements ISysClientService {
@Cacheable(cacheNames = CacheNames.SYS_CLIENT, key = "#clientId")
@Override
public SysClientVo queryByClientId(String clientId) {
log.debug("【queryByClientId】缓存未命中开始执行数据库查询clientId={}", clientId);
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysClient>().eq(SysClient::getClientId, clientId));
}
@ -125,16 +126,16 @@ public class SysClientServiceImpl implements ISysClientService {
@Override
public int updateClientStatus(String clientId, String status) {
return baseMapper.update(null,
new LambdaUpdateWrapper<SysClient>()
.set(SysClient::getStatus, status)
.eq(SysClient::getClientId, clientId));
new LambdaUpdateWrapper<SysClient>()
.set(SysClient::getStatus, status)
.eq(SysClient::getClientId, clientId));
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(SysClient entity) {
//TODO 做一些数据校验,如唯一约束
// TODO 做一些数据校验,如唯一约束
}
/**
@ -144,7 +145,7 @@ public class SysClientServiceImpl implements ISysClientService {
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if (isValid) {
//TODO 做一些业务上的校验,判断是否需要校验
// TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteByIds(ids) > 0;
}