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
public FirmInfoCache getFirmInfoByUserId(Long userId) {
FirmInfoCache firmInfoCache=null;
if (redisService.hasKey("firm"+userId)){
firmInfoCache=redisService.getCacheObject("firm"+userId);
}
LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>();
Assert.notNull(userId,"用户不能为空");
queryWrapper.eq(FirmInfo::getCreateBy,userId);
firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper));
log.info(firmInfoCache);
return firmInfoCache;
// FirmInfoCache firmInfoCache=null;
// if (redisService.hasKey("firm"+userId)){
// firmInfoCache=redisService.getCacheObject("firm"+userId);
// }
// LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>();
// Assert.notNull(userId,"用户不能为空");
// queryWrapper.eq(FirmInfo::getCreateBy,userId);
// firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper));
// log.info(firmInfoCache);
return null;
}
}