submitPartnerIntentInfo
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
@@ -130,6 +131,11 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
|
||||
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
|
||||
PartnerIntentInfoRequest oldRequest = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoRequest.class);
|
||||
BeanUtil.copyProperties(request, oldRequest);
|
||||
request = oldRequest;
|
||||
}
|
||||
if(!request.getSubmitFlag()){
|
||||
// 自动保存时
|
||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||
|
||||
Reference in New Issue
Block a user