submitPartnerIntentInfo

This commit is contained in:
wxp01309236
2023-06-26 17:58:20 +08:00
parent 25aab92b76
commit 18ef8cc073

View File

@@ -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);