Authored by mingdan.ge

+日志

... ... @@ -115,6 +115,7 @@ public class RedisHashCache {
if (StringUtils.isEmpty(cacheKey) || StringUtils.isEmpty(hashKey)) {
return null;
}
logger.info("RedisHashCache get ,cacheKey is: {},obj is: {},hashkey {}", cacheKey,obj, hashKey);
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(cacheKey).appendVar(obj);
String value = this.hashOperations.get(redisKeyBuilder, hashKey);
if (StringUtils.isEmpty(value)) {
... ... @@ -185,11 +186,12 @@ public class RedisHashCache {
logger.warn("RedisHashCache put failed!!! value {}", v);
return;
}
logger.info("RedisHashCache put, cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(cacheKey).appendVar(obj);
this.hashOperations.put(redisKeyBuilder, hashKey, v);
this.yHRedisTemplate.longExpire(redisKeyBuilder, timeout, unit);
} catch (Exception e) {
logger.warn("RedisHashCache get failed!!! cacheKey is: {},obj is: {},hashkey {}", cacheKey,obj, hashKey);
logger.warn("RedisHashCache get failed!!! cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
}
}
... ...
... ... @@ -26,6 +26,7 @@ public class UnionShareRest {
@RequestMapping("/getShareInfoByUid")
@ResponseBody
public UnionResponse getShareInfoByUid(int uid){
log.info("getShareInfoByUid,uid is {}",uid);
ShareUserSettlementInfoBo result = unionShareService.getUserSettleMentInfo(uid);
return new UnionResponse(200, "getShareInfoByUid success", result);
}
... ... @@ -33,6 +34,7 @@ public class UnionShareRest {
@RequestMapping("/addSettlement")
@ResponseBody
public UnionResponse addSettlement(int uid){
log.info("addSettlement,uid is {}",uid);
unionShareService.addSettlement(uid);
return new UnionResponse(200, "addSettlement success", null);
}
... ...
... ... @@ -420,6 +420,7 @@ public class UnionShareServiceImpl implements IUnionShareService {
public void clearShareOrderRedis(int uid) {
//清缓存
logger.info("clearShareOrderRedis,uid is {}",uid);
redisHashCache.delete(ShareOrdersKeyEnum.ORDER_INFO.getPreKey(),uid);
redisHashCache.delete(ShareOrdersKeyEnum.ORDER_LIST.getPreKey(),uid);
redisHashCache.delete(ShareOrdersKeyEnum.SETTLEMENT_LIST.getPreKey(),uid);
... ...