upd
parent
6233eabee2
commit
0fcd4773ab
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue