Authored by wangshusheng

日志

... ... @@ -61,7 +61,6 @@ public class CutDownPriceActivityServiceImpl implements ICutDownPriceActivitySer
String redisKeySuffix = activityId + "";
CutDownPriceActivityBo cutDownPriceActivityBo = redisValueCache.get(CacheKeyEnum.CUTDOWN_PRICE_ACTIVITYBO_INFO, redisKeySuffix, CutDownPriceActivityBo.class);
if (null != cutDownPriceActivityBo){
logger.info("CutDownPriceActivityServiceImpl :: queryActivityInfo getCache result is{}",cutDownPriceActivityBo);
return cutDownPriceActivityBo;
}
CutDownPriceActivity cutDownPriceActivity = cutDownPriceActivityMapper.selectCutDownPriceActivity(activityId);
... ...
... ... @@ -48,7 +48,6 @@ public class CutDownPriceProductServiceImpl implements ICutDownPriceProductServi
String redisKeySuffix = activityId + ":" + productSkn;
CutDownPriceProductBo cutDownPriceProductBo = redisValueCache.get(CacheKeyEnum.CUTDOWN_PRICE_PRODUCTBO_INFO, redisKeySuffix, CutDownPriceProductBo.class);
if (null != cutDownPriceProductBo){
logger.info("CutDownPriceProductServiceImpl :: queryCutDownPriceProductBo getCache result is{}",cutDownPriceProductBo);
return cutDownPriceProductBo;
}
CutDownPriceProduct cutDownPriceProduct = cutDownPriceProductMapper.selectCutDownPriceProduct(activityId, productSkn);
... ...
... ... @@ -54,7 +54,7 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
private static final Integer TIME_24_HOUR = 24*3600;
private static final String SYSTEM_HELP_NAME = "有货";
private static final String SYSTEM_HELP_IMAGE = "https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKic2dZ7ib6p1PJJXFpYl95ibRyvSKCib3icUiaStlRN6PWmcRZjzPn4w4moEk2xhUxpYbibuPtBNPJBMeqQ/132";
private static final String SYSTEM_HELP_IMAGE = "https://feature.yoho.cn/1019/yoho2x.png";
@Autowired
private RedisValueCache redisValueCache;
@Autowired
... ... @@ -427,7 +427,7 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
}
}
// 清理缓存,用户帮砍记录列表、商品详情页
clearCache(activityId, productSkn, userId);
clearCache(activityId, productSkn, userId, recordDb.getId());
// 砍价成功时,给用户推送砍价成功消息
if(helpUsers!=null && (helpUsers.size()+1) == cutDownPriceProductBo.getJoinNum()){
pushSuccessMessage(userId, activityBo, cutDownPriceProductBo);
... ... @@ -472,7 +472,7 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
}
// 清理缓存,用户帮砍记录列表、商品详情页
clearCache(activityId, productSkn, userId);
clearCache(activityId, productSkn, userId, record.getId());
CutDownPriceProductHelpUserBo bo = new CutDownPriceProductHelpUserBo();
bo.setUserImgUrl(userImageUrl);
... ... @@ -514,9 +514,6 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
logger.info(" system start addHelpUserInfo, userId is {}, activityId is {}, productSkn is {}", userId, activityId, productSkn);
CutDownPriceProductHelpUserBo help = addSystemHelpUserInfo(convertCutDownPriceProductSystemHelpUser(cutPriceHelpUserRequestBO), activityBo, cutDownPriceProductBo, record);
cutPrice = help.getCutPrice();
// 调uid查询用户头像
// UserInfoRspBO[] userInfoBoArray = invokeUicGetUserInfo(userId.toString());
// userImageUrl = buildUserImage(userId, userInfoBoArray);
userImageUrl = help.getUserImgUrl();
}catch(Exception e){
logger.warn(" system addHelpUserInfo failed, userId is {}, activityId is {}, productSkn is {}, exception is {}", userId, activityId, productSkn, e);
... ... @@ -844,9 +841,9 @@ public class CutDownPriceServiceImpl implements ICutDownPriceService {
}
// 清理缓存,用户帮砍记录列表、商品详情页
private void clearCache(Integer activityId, Integer productSkn, Integer userId) {
private void clearCache(Integer activityId, Integer productSkn, Integer userId, Integer recordId) {
// 清理用户帮砍记录列表
String redisKeySuffix = userId + ":" + activityId + ":" + productSkn;
String redisKeySuffix = userId + ":" + activityId + ":" + productSkn + ":" + recordId;
redisValueCache.delete(CacheKeyEnum.CUTDOWN_PRICE_HELP_USERLIST_INFO, redisKeySuffix);
// 清理我的砍价列表
redisHashCache.delete(CacheKeyEnum.CUTDOWN_PRICE_MYPRODUCTLIST_INFO.getCacheKey(), userId);
... ...