Commit 1f21a016 by xiaoer.li@freemud.com

Merge branch 'feature/new-fixbig'

parents b599b2ee aef94ff7
......@@ -315,6 +315,7 @@ public class ShoppingCartAdapter {
updateComboxGoodsInfoNew(productGroup, spuProduct, false);
}
}
cartGoods.setGoodsType(GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType());
}
//更新当前商品行价格
Long newOrigOriginalPrice = 0L;
......
......@@ -95,6 +95,7 @@ public enum ResponseResult {
SHOPPING_CART_HG_COUPON_NOT_EXIST("44027", "换购券不存在"),
SHOPPING_CART_LIMIT_ADD("44025", "加购数量超过限制"),
SHOPPING_CART_GOODS_CHECK_ERROR("44028", "当前餐盘中没有可用券的饮品"),
SHOPPING_CART_NO_MEAL("44029", "请至少选择一个可选商品"),
/**
* 订单状态码
......
......@@ -951,6 +951,14 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
}
if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) {
cartGoodsList.remove(i);
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService);
throw new ServiceException(ResponseResult.SHOPPING_CART_NO_MEAL);
}
}
}
// 当加价购商品不为空时
if (CollectionUtils.isNotEmpty(sendGoodsList)) {
......
......@@ -334,7 +334,12 @@ public class CalculationCommonService {
if (cartGoods.isWeightType()) {
cartGoodsDetailDto.setProductType(ProductType.WEIGHT_PRODUCT.getCode());
}
cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice());
if (calculationGoods!=null) {
cartGoodsDetailDto.setOriginalPrice(calculationGoods.getOriginalPrice());
}
else {
cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice());
}
if (calculationGoods!=null) {
cartGoodsDetailDto.setTotalDiscountAmount(calculationGoods.getDiscountAmount().intValue());
//cartGoodsDetailDto.setOriginalPrice(calculationGoods.getOriginalPrice());
......@@ -418,6 +423,7 @@ public class CalculationCommonService {
originalPriceSum += goodsDetailDto.getOriginalPrice() * (goodsDetailDto.getQty() / cartGoods.getQty());
//originalPriceSum += goodsDetailDto.getOriginalPrice() * goodsDetailDto.getQty();
}
cartGoodsDetailDto.setProductType(ProductType.SETMEAL.getCode());
cartGoodsDetailDto.setOriginalPrice(cartGoodsDetailDto.getOriginalPrice() + originalPriceSum);
}
cartGoodsDetailDto.setComboProducts(combs);
......
......@@ -120,6 +120,15 @@ public class CalculationSharingDiscountService {
}
}
}
if (GoodsTypeEnum.SET_MEAL_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
if (CollectionUtils.isEmpty(cartGoods.getProductGroupList()) && CollectionUtils.isEmpty(cartGoods.getProductComboList())) {
cartGoodsList.remove(i);
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService);
throw new ServiceException(ResponseResult.SHOPPING_CART_NO_MEAL);
}
}
}
/*加价购商品不为空*/
......
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