Commit 1a4e5269 by 徐康

前端传remove,则删除记录的code

parent 5272e0c5
......@@ -298,16 +298,20 @@ public class ShoppingCartMCoffeeServiceImpl {
String receiveId = shoppingCartInfoRequestVo.getReceiveId();
// /**
// * 如果couponCode为空,则从缓存里尝试获取
// * 如果couponCode不为空,则设置到缓存里
// */
// if(StringUtils.isEmpty(couponCode)) {
// couponCode = assortmentSdkService.getShoppingCartCoupon(partnerId, storeId, userId, shoppingCartBaseService);
// //TODO 校验券是否可用,不可用要删除
// } else {
// assortmentSdkService.setShoppingCartCouponCode(partnerId, storeId, userId, couponCode, shoppingCartBaseService);
// }
/**
* 如果couponCode为空,则从缓存里尝试获取
* 如果couponCode不为空,则设置到缓存里
*/
if(StringUtils.isEmpty(couponCode)) {
couponCode = assortmentSdkService.getShoppingCartCoupon(partnerId, storeId, userId, shoppingCartBaseService);
//TODO 校验券是否可用,不可用要删除
} else {
if("remove".equals(couponCode)) {
couponCode = "";
assortmentSdkService.setShoppingCartCouponCode(partnerId, storeId, userId, "", shoppingCartBaseService);
}
assortmentSdkService.setShoppingCartCouponCode(partnerId, storeId, userId, couponCode, shoppingCartBaseService);
}
// 获取购物车商品
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, sessionId, "", shoppingCartBaseService);
......
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