فهرست منبع

mall:新增价格计算的接口

YunaiV 2 سال پیش
والد
کامیت
96fc252348

+ 18 - 7
yudao-module-mall/yudao-module-market-api/src/main/java/cn/iocoder/yudao/module/market/api/price/dto/PriceCalculateRespDTO.java

@@ -66,8 +66,8 @@ public class PriceCalculateRespDTO {
          * + {@link #deliveryPrice}
          * - {@link #skuPromotionPrice}
          * - {@link #orderPromotionPrice}
-         * - {@link #couponPrice} // TODO 芋艿:需要再考虑一下它
          */
+        //         * - {@link #couponPrice}  // TODO 芋艿:靠营销表记录
         private Integer payPrice;
 
         // ========== 营销基本信息 ==========
@@ -75,10 +75,12 @@ public class PriceCalculateRespDTO {
          * 优惠劵编号
          */
         private Long couponId;
-        /**
-         * 优惠劵减免金额,单位:分
-         */
-        private Integer couponPrice;
+//        /**
+//         * 优惠劵减免金额,单位:分
+//         *
+//         *   // TODO 芋艿:靠营销表记录
+//         */
+//        private Integer couponPrice;
 
     }
 
@@ -162,8 +164,17 @@ public class PriceCalculateRespDTO {
          * 计算时的优惠(总),单位:分
          */
         private Integer totalPromotionPrice;
-        // TODO 芋艿:是否匹配,match ;不匹配的原因
-        // TODO 芋艿:描述
+        /**
+         * 是否满足优惠条件
+         */
+        private Boolean meet;
+        /**
+         * 满足条件的提示
+         *
+         * 如果 {@link #meet} = true 满足,则提示“圣诞价:省 150.00 元”
+         * 如果 {@link #meet} = false 不满足,则提示“购满 85 元,可减 40 元”
+         */
+        private String meetTip;
 
         /**
          * 匹配的商品 SKU

+ 6 - 6
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderDO.java

@@ -148,9 +148,9 @@ public class TradeOrderDO extends BaseDO {
      * + {@link #deliveryPrice}
      * - {@link #skuPromotionPrice}
      * - {@link #orderPromotionPrice}
-     * - {@link #couponPrice}
      */
     // niu - pay_money;taobao - payment(主订单实付金额) | trade.total_fee(主订单应付金额,参考使用);
+//     * - {@link #couponPrice}  // TODO 芋艿:靠营销表记录
     private Integer payPrice;
     /**
      * 支付订单编号
@@ -247,11 +247,11 @@ public class TradeOrderDO extends BaseDO {
      * 优惠劵编号
      */
     private Long couponId;
-    /**
-     * 优惠劵减免金额,单位:分
-     */
-    // niu - coupon_money;
-    private Integer couponPrice;
+//    /**
+//     * 优惠劵减免金额,单位:分  // TODO 芋艿:靠营销表记录
+//     */
+//    // niu - coupon_money;
+//    private Integer couponPrice;
 //    /**
 //     * 积分抵扣的金额,单位:分
 //     */