Bladeren bron

优惠券处理优化

liujunchi 2 jaren geleden
bovenliggende
commit
6560f4dae0

+ 2 - 1
cooleshow-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -191,6 +191,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
                 orderItem.setCouponAmount(new BigDecimal(0));
             }
         } else {
+            BigDecimal totalAmount = calcTotalAmount(orderItemList);
             // todo 使用优惠券 远程调用获取优惠券金额
             // SmsCouponHistoryDetail couponHistoryDetail = getUseCoupon(cartPromotionItemList, orderParam.getCouponId());
             //     if (couponHistoryDetail == null) {
@@ -198,7 +199,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
             // }
             //对下单商品的优惠券进行处理
             HttpResponseResult<CouponInfoApi> couponInfoApiHttpResponseResult = adminFeignService.queryCouponOrderPageInfo(
-                    currentMember.getId(), orderParam.getCouponId(), orderParam.getOrderAmount(),
+                    currentMember.getId(), orderParam.getCouponId(), totalAmount,
                     orderParam.getPlatformType());
             CouponInfoApi data = couponInfoApiHttpResponseResult.getData();
             if(data != null) {