更新缓存
This commit is contained in:
@@ -108,6 +108,21 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
|
||||
//修改意向申请信息中的加盟商名称与手机号
|
||||
hyPartnerBaseInfoDAO.updateByPartnerId(baseUserInfoRequest.getUsername(),baseUserInfoRequest.getMobile(),baseUserInfoRequest.getPartnerId());
|
||||
|
||||
// 更新线索状态
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoService.generateDefaultLineInfo(hyPartnerUserInfoDO.getPartnerId(), baseUserInfoRequest.getWantShopArea(), baseUserInfoRequest.getAcceptAdjustType());
|
||||
|
||||
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, baseUserInfoRequest.getPartnerId(), hyPartnerLineInfoDO.getId());
|
||||
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
|
||||
PartnerIntentInfoRequest request = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class);
|
||||
if(!baseUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())
|
||||
|| !baseUserInfoRequest.getAcceptAdjustType().equals(request.getAcceptAdjustType())){
|
||||
request.setWantShopArea(baseUserInfoRequest.getWantShopArea());
|
||||
request.setAcceptAdjustType(baseUserInfoRequest.getAcceptAdjustType());
|
||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,10 +117,12 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
||||
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, partnerUserInfoRequest.getPartnerId(), hyPartnerLineInfoDO.getId());
|
||||
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
|
||||
PartnerIntentInfoRequest request = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class);
|
||||
if(!partnerUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())){
|
||||
if(!partnerUserInfoRequest.getWantShopArea().equals(request.getWantShopArea())
|
||||
|| !partnerUserInfoRequest.getAcceptAdjustType().equals(request.getAcceptAdjustType())){
|
||||
request.setWantShopArea(partnerUserInfoRequest.getWantShopArea());
|
||||
request.setAcceptAdjustType(partnerUserInfoRequest.getAcceptAdjustType());
|
||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||
}
|
||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||
}
|
||||
return applyBaseInfoVO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user