浏览代码

Merge branch 'master' of wangchaoqun/kmall-haikong into master

王超群 3 年之前
父节点
当前提交
871bea0c26

+ 5 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/order/OrderController.java

@@ -668,7 +668,7 @@ public class OrderController {
         List<OrderWXPayRecordEntity> payRecords = orderWXPayRecordService.getRecordsByOutTradeNo(order.getOrderSn());
         BigDecimal tax = new BigDecimal(0);
         List<OrderGoodsEntity> goodsList = order.getOrderGoodsEntityList();
-
+        BigDecimal allDiscountedPrice = new BigDecimal(0);
         for (OrderGoodsEntity orderGoodsEntity : goodsList) {
             GoodsEntity goodsEntity = goodsService.queryObject(orderGoodsEntity.getGoodsId());
             BigDecimal goodsTax = CalculateTax.calculateFinalTax(goodsEntity,orderGoodsEntity.getMarketPrice(),goodsService).setScale(3,RoundingMode.HALF_UP);
@@ -684,10 +684,13 @@ public class OrderController {
 //            orderGoodsEntity.setTax(goodsTax);
 //
 //            tax = tax.add(goodsTax).setScale(2,RoundingMode.HALF_UP);
-
+            allDiscountedPrice = allDiscountedPrice.add(orderGoodsEntity.getDiscountedPrice());
         }
+        BigDecimal otherDiscountPrice = allDiscountedPrice.subtract(order.getIntegralMoney());
         order.setTax(tax);
         order.setPayRecordList(payRecords);
+        // 放入订单其他优惠
+        order.setOtherDiscountedPrice(otherDiscountPrice);
         return R.ok().put("order", order);
     }
 

+ 5 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -2699,7 +2699,7 @@ public class OrderServiceImpl implements OrderService {
                             giftGoodsScoreDetailMap.put(pointsDetailNameId, orderGiftScoreRulesVo);
                             goodsDataMap.remove(pointsDetailNameId);
                         }
-                        break;
+
                     }
                     if (pointsType.equals(Constants.MemberScoreRulesEnum.ONE.getCode())) {
                         Collection<GoodsEntity> values = goodsDataMap.values();
@@ -2735,7 +2735,7 @@ public class OrderServiceImpl implements OrderService {
                                 }
                             }
                         }
-                        break;
+
                     }
                     if (pointsType.equals(Constants.MemberScoreRulesEnum.ZERO.getCode())) {
                         // 门店
@@ -2768,8 +2768,8 @@ public class OrderServiceImpl implements OrderService {
                             getGiftScore(activityGiftScore, bigDecimal, mkActivitiesEntityMap, sku, orderGiftScoreRulesVo);
                             giftGoodsScoreDetailMap.put(sku, orderGiftScoreRulesVo);
                         }
+
                     }
-                    break;
                 }
 
                 goodsSkuList.forEach(s -> {
@@ -4543,7 +4543,8 @@ public class OrderServiceImpl implements OrderService {
         List<String> promotionSkuList = new ArrayList<>();
         // 判断活动类型并排序,再确定购物栏中商品是否满足活动条件
         mkActivitiesEntityList.stream().filter(mkActivitiesEntity -> {
-            if (!Constants.ActivityTopicEnum.JFDK.getTopicCode().equals(mkActivitiesEntity.getMkaTopic())) {
+            if (!Constants.ActivityTopicEnum.JFDK.getTopicCode().equals(mkActivitiesEntity.getMkaTopic())
+                    && !Constants.ActivityTopicEnum.ZSJF.getTopicCode().equals(mkActivitiesEntity.getMkaTopic())) {
                 return true;
             }
             if (Objects.isNull(mkActivitiesEntity.getPriority())) {

+ 1 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/offilineOrderList.html

@@ -235,6 +235,7 @@
                         <td align="left" colspan="2" style="font-weight: bold;">总计</td>
                         <td align="center">¥{{order.orderPrice}}</td>
                         <td align="center">¥{{order.fullCutPrice}}</td>
+                        <td align="center">¥{{order.otherDiscountedPrice}}</td>
                         <td align="center">¥{{order.actualPrice}}</td>
 
                         <td align="center" v-show="order.payStatus == 0">未付款</td>