Commit 8b8932b0 by 徐康

购物车增加过期时间

parent d283ed60
...@@ -94,7 +94,9 @@ public interface ShoppingCartBaseService { ...@@ -94,7 +94,9 @@ public interface ShoppingCartBaseService {
* @param cartParamDto * @param cartParamDto
* @return * @return
*/ */
BaseResponse<List<CartGoods>> setCartGoodsList(CartParamDto cartParamDto, String trackingNo, long expire, TimeUnit timeUnit); default BaseResponse<List<CartGoods>> setCartGoodsList(CartParamDto cartParamDto, String trackingNo, long expire, TimeUnit timeUnit) {
return null;
}
/** /**
* 设置购物车代金券信息 * 设置购物车代金券信息
......
...@@ -59,6 +59,8 @@ public class AssortmentSdkService { ...@@ -59,6 +59,8 @@ public class AssortmentSdkService {
@Autowired @Autowired
private StoreItemClient storeItemClient; private StoreItemClient storeItemClient;
@Value("${mccafe.partner.id}")
private String mcCafePartnerId;
@Value("${mccafe.universal.shopId}") @Value("${mccafe.universal.shopId}")
private String mcCafeUniversalShopId; private String mcCafeUniversalShopId;
...@@ -186,7 +188,7 @@ public class AssortmentSdkService { ...@@ -186,7 +188,7 @@ public class AssortmentSdkService {
cartParamDto.setUserId(useId); cartParamDto.setUserId(useId);
cartParamDto.setCartGoodsList(JSONArray.parseArray(JSONObject.toJSONString(cartGoodsList), com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.class)); cartParamDto.setCartGoodsList(JSONArray.parseArray(JSONObject.toJSONString(cartGoodsList), com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.class));
BaseResponse<List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods>> baseResponse = null; BaseResponse<List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods>> baseResponse = null;
if(!mcCafeUniversalShopId.equals(storeId)) { if(!mcCafePartnerId.equals(partnerId) || !mcCafeUniversalShopId.equals(storeId)) {
baseResponse = shoppingCartService.setCartGoodsList(cartParamDto, LogThreadLocal.getTrackingNo()); baseResponse = shoppingCartService.setCartGoodsList(cartParamDto, LogThreadLocal.getTrackingNo());
} else { } else {
baseResponse = shoppingCartService.setCartGoodsList(cartParamDto, LogThreadLocal.getTrackingNo(), 10, TimeUnit.DAYS); baseResponse = shoppingCartService.setCartGoodsList(cartParamDto, LogThreadLocal.getTrackingNo(), 10, TimeUnit.DAYS);
......
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