master
冯凯 2023-11-21 14:55:25 +08:00
parent 6233eabee2
commit 0fcd4773ab
1 changed files with 10 additions and 10 deletions

View File

@ -38,15 +38,15 @@ public class FirmInfoServiceImpl extends ServiceImpl<FirmInfoMapper,FirmInfo> im
@Override @Override
public FirmInfoCache getFirmInfoByUserId(Long userId) { public FirmInfoCache getFirmInfoByUserId(Long userId) {
FirmInfoCache firmInfoCache=null; // FirmInfoCache firmInfoCache=null;
if (redisService.hasKey("firm"+userId)){ // if (redisService.hasKey("firm"+userId)){
firmInfoCache=redisService.getCacheObject("firm"+userId); // firmInfoCache=redisService.getCacheObject("firm"+userId);
} // }
LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>();
Assert.notNull(userId,"用户不能为空"); // Assert.notNull(userId,"用户不能为空");
queryWrapper.eq(FirmInfo::getCreateBy,userId); // queryWrapper.eq(FirmInfo::getCreateBy,userId);
firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper)); // firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper));
log.info(firmInfoCache); // log.info(firmInfoCache);
return firmInfoCache; return null;
} }
} }