|
@@ -134,9 +134,8 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
// 超级会员设置商品优惠价
|
|
|
productService.setSvipProductPrice(cartItemVo, taxFlag, svipUserFlag);
|
|
|
if (svipUserFlag) {
|
|
|
- // 超级会员设置供应商价格-商品优惠金额,店铺优惠总额 + 商品优惠金额
|
|
|
- shopPrice.set(MathUtil.sub(shopPrice.get(), cartItemVo.getSvipTotalReducedPrice()).doubleValue());
|
|
|
- shopReducedPrice.set(MathUtil.add(shopReducedPrice, cartItemVo.getSvipTotalReducedPrice()).doubleValue());
|
|
|
+ // 超级会员设置超级会员优惠总额 + 商品优惠金额
|
|
|
+ shopSvipReducedPrice.set(MathUtil.add(shopSvipReducedPrice, cartItemVo.getSvipTotalReducedPrice()).doubleValue());
|
|
|
}
|
|
|
} else {
|
|
|
// 获取商品促销信息
|
|
@@ -285,14 +284,11 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
shop.setCartList(productList);
|
|
|
// 供应商总价
|
|
|
shop.setTotalPrice(shopPrice.get());
|
|
|
- // 当有超级会员优惠时,取超级会员优惠
|
|
|
- Double shopReduction = MathUtil.compare(shopSvipReducedPrice, 0) > 0 ? shopSvipReducedPrice.get() : shopReducedPrice.get();
|
|
|
// 供应商总优惠
|
|
|
shop.setReducedPrice(shopReducedPrice.get());
|
|
|
// 供应商总超级会员优惠
|
|
|
shop.setSvipReducedPrice(shopSvipReducedPrice.get());
|
|
|
// 供应商划线价
|
|
|
- shop.setOriginalPrice(MathUtil.add(shopPrice.get(), shopReduction).doubleValue());
|
|
|
shop.setOriginalPrice(shopOriginalPrice.get());
|
|
|
// 计算总价
|
|
|
totalPrice.set(MathUtil.add(totalPrice, shop.getTotalPrice()).doubleValue());
|
|
@@ -664,6 +660,8 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
AtomicDouble totalPrice = new AtomicDouble(0);
|
|
|
// 统计总促销满减
|
|
|
AtomicDouble reducedPrice = new AtomicDouble(0);
|
|
|
+ // 统计总超级会员优惠
|
|
|
+ AtomicDouble svipReducedPrice = new AtomicDouble(0);
|
|
|
// 统计总划线价
|
|
|
AtomicDouble totalOriginalPrice = new AtomicDouble(0);
|
|
|
// 促销活动(总)
|
|
@@ -705,10 +703,10 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
AtomicDouble shopPromotionFee = new AtomicDouble(0);
|
|
|
// 该供应商满减金额(供应商满减,单品满减)
|
|
|
AtomicDouble shopReducedPrice = new AtomicDouble(0);
|
|
|
- // 该供应商划线价
|
|
|
- AtomicDouble shopOriginalPrice = new AtomicDouble(0);
|
|
|
// 该供应商svip优惠金额
|
|
|
AtomicDouble shopSvipReducedPrice = new AtomicDouble(0);
|
|
|
+ // 该供应商划线价
|
|
|
+ AtomicDouble shopOriginalPrice = new AtomicDouble(0);
|
|
|
// 供应商促销优惠活动
|
|
|
PromotionsVo shopPromotion = baseMapper.getPromotionByShopId(shop.getShopId());
|
|
|
// 供应商下商品列表
|
|
@@ -838,15 +836,11 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
shop.setCartList(productList);
|
|
|
// 供应商总价
|
|
|
shop.setTotalPrice(shopPrice.get());
|
|
|
- // 当有超级会员优惠时,取超级会员优惠
|
|
|
- Double shopReduction = MathUtil.compare(shopSvipReducedPrice, 0) > 0 ? shopSvipReducedPrice.get() : shopReducedPrice.get();
|
|
|
// 供应商总优惠
|
|
|
shop.setReducedPrice(shopReducedPrice.get());
|
|
|
// 供应商总超级会员优惠
|
|
|
shop.setSvipReducedPrice(shopSvipReducedPrice.get());
|
|
|
// 供应商划线价
|
|
|
- shop.setOriginalPrice(MathUtil.add(shopPrice.get(), shopReduction).doubleValue());
|
|
|
-
|
|
|
shop.setOriginalPrice(shopOriginalPrice.get());
|
|
|
// 添加供应商Id集合
|
|
|
shopIds.add(shop.getShopId());
|
|
@@ -922,6 +916,7 @@ public class CartClubServiceImpl implements CartClubService {
|
|
|
resultData.put("totalCount", totalCount);
|
|
|
resultData.put("totalPrice", totalPrice);
|
|
|
resultData.put("reducedPrice", reducedPrice);
|
|
|
+ resultData.put("svipReducedPrice", svipReducedPrice);
|
|
|
resultData.put("totalOriginalPrice", totalOriginalPrice);
|
|
|
resultData.put("promotions", totalPromotions);
|
|
|
resultData.put("invoice", invoice);
|