Commit eba612ec by 缪晖

新增拼单完成、取消后购物车保留时间

parent 75a3489a
......@@ -12,6 +12,7 @@ import com.freemud.sdk.api.assortment.shoppingcart.service.CollageOrderBaseServi
import com.freemud.sdk.api.assortment.shoppingcart.util.CartResponseUtil;
import com.freemud.sdk.api.assortment.shoppingcart.util.DateTimeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -43,6 +44,12 @@ public class CollageOrderBaseServiceImpl implements CollageOrderBaseService {
@Autowired
private RedisTemplate redisTemplate;
@Value("${collage.complete.delay.minute}")
private int completeDelayMinute = 1;
@Value("${collage.cancel.delay.minute}")
private int cancelDelayMinute = 1;
/**
* 查询拼单订单
* 根据createCollageUserId查询,先根据key查询,若不存在去商户旗下拼单列表查询,若存在则返回
......@@ -192,11 +199,11 @@ public class CollageOrderBaseServiceImpl implements CollageOrderBaseService {
// 获取当前拼单剩余缓存时间
long expireSeconds = this.getCollageBashHashExpireSeconds(collageBaseHashKey);
// 若状态更新为已完成 则将失效时间改为5分钟
// 若状态更新为已完成 则将失效时间改为N分钟
if (CollageOrderStatus.COMPLETE.getValue().equals(collageOrderDto.getStatus())) {
expireSeconds = 1 * 60L;
expireSeconds = completeDelayMinute * 60L;
} else if (CollageOrderStatus.CANCEL.getValue().equals(collageOrderDto.getStatus())) {
expireSeconds = 1 * 60L;
expireSeconds = cancelDelayMinute * 60L;
}
// 修改拼单主信息失效时间
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment