选择自提购物车商品不取消问题
This commit is contained in:
parent
0f2ed23b02
commit
856aee6c18
@ -3,6 +3,7 @@ package cn.lili.modules.order.cart.entity.vo;
|
||||
import cn.lili.modules.distribution.entity.dos.DistributionGoods;
|
||||
import cn.lili.modules.goods.entity.dos.GoodsSku;
|
||||
import cn.lili.modules.order.cart.entity.enums.CartTypeEnum;
|
||||
import cn.lili.modules.order.cart.entity.enums.DeliveryMethodEnum;
|
||||
import cn.lili.modules.promotion.tools.PromotionTools;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -89,6 +90,12 @@ public class CartSkuVO extends CartBase implements Serializable {
|
||||
@ApiModelProperty(value = "购物车类型")
|
||||
private CartTypeEnum cartType;
|
||||
|
||||
/**
|
||||
* @see DeliveryMethodEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "配送方式")
|
||||
private String deliveryMethod;
|
||||
|
||||
/**
|
||||
* 在构造器里初始化促销列表,规格列表
|
||||
*/
|
||||
|
@ -81,6 +81,7 @@ public class CartVO extends CartBase implements Serializable {
|
||||
public CartVO(CartSkuVO cartSkuVO) {
|
||||
this.setStoreId(cartSkuVO.getStoreId());
|
||||
this.setStoreName(cartSkuVO.getStoreName());
|
||||
this.setDeliveryMethod(cartSkuVO.getDeliveryMethod());
|
||||
this.setSkuList(new ArrayList<>());
|
||||
this.setCouponList(new ArrayList<>());
|
||||
this.setGiftList(new ArrayList<>());
|
||||
|
@ -492,12 +492,11 @@ public class CartServiceImpl implements CartService {
|
||||
if (CharSequenceUtil.isNotEmpty(way)) {
|
||||
cartTypeEnum = CartTypeEnum.valueOf(way);
|
||||
}
|
||||
TradeDTO tradeDTO = this.getCheckedTradeDTO(cartTypeEnum);
|
||||
for (CartVO cartVO : tradeDTO.getCartList()) {
|
||||
cartVO.setDeliveryMethod(DeliveryMethodEnum.valueOf(deliveryMethod).name());
|
||||
TradeDTO tradeDTO = this.readDTO(cartTypeEnum);
|
||||
for (CartSkuVO cartSkuVO : tradeDTO.getSkuList()) {
|
||||
cartSkuVO.setDeliveryMethod(DeliveryMethodEnum.valueOf(deliveryMethod).name());
|
||||
}
|
||||
this.resetTradeDTO(tradeDTO);
|
||||
TradeDTO neTradeDTO = (TradeDTO) cache.get(this.getOriginKey(cartTypeEnum));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user