Pārlūkot izejas kodu

trade:完善 TradeOrderItemDO 字段

YunaiV 2 gadi atpakaļ
vecāks
revīzija
05614cc0b8

+ 34 - 71
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/order/TradeOrderItemDO.java

@@ -71,7 +71,7 @@ public class TradeOrderItemDO extends BaseDO {
      */
     private Integer count;
     /**
-     * 是否评论
+     * 是否评论 TODO
      *
      * false - 未评论
      * true - 已评论
@@ -79,61 +79,61 @@ public class TradeOrderItemDO extends BaseDO {
     private Boolean commented;
 
     // ========== 价格 + 支付基本信息 ==========
+
     /**
-     * 商品原价(),单位:分
+     * 商品原价(),单位:分
      *
-     * 对应 ProductSkuDO 的 price 字段
+     * = {@link #originalUnitPrice} * {@link #getCount()}
      */
-    // like - original_price;niu - costPrice
     private Integer originalPrice;
     /**
-     * 商品原价(),单位:分
+     * 商品原价(),单位:分
      *
-     * = {@link #originalPrice} * {@link #count}
+     * 对应 ProductSkuDO 的 price 字段
+     * 对应 taobao 的 order.price 字段
      */
-    // like - total_price;niu - 暂无
-    private Integer totalOriginalPrice;
+    private Integer originalUnitPrice;
     /**
-     * 商品级优惠(总),单位:分
+     * 商品优惠(总),单位:分
+     *
+     * 商品级优惠:对单个商品的,常见如:商品原价的 8 折;商品原价的减 50 元
      *
-     * 例如说“限时折扣”:商品原价的 8 折;商品原价的减 50 元
+     * 对应 taobao 的 order.discount_fee 字段
      */
-    // taobao - order.discount_fee(子订单商品优惠)
-    private Integer totalPromotionPrice;
+    private Integer discountPrice;
     /**
-     * 最终购买金额(单),单位:分。
+     * 子订单实付金额,不算主订单分摊金额,单位:分
+     *
+     * = {@link #originalPrice}
+     * - {@link #discountPrice}
      *
-     * = {@link #totalPresentPrice} / {@link #count}
+     * 对应 taobao 的 order.payment 字段
      */
-    private Integer presentPrice;
+    private Integer payPrice;
+
     /**
-     * 最终购买金额(总),单位:分。
+     * 子订单分摊金额(总),单位:分
+     * 需要分摊 {@link TradeOrderDO#getDiscountPrice()}、{@link TradeOrderDO#getCouponPrice()}、{@link TradeOrderDO#getPointPrice()}
      *
-     * = {@link #totalOriginalPrice}
-     * - {@link #totalPromotionPrice}
+     * 对应 taobao 的 order.part_mjz_discount 字段
+     * 淘宝说明:子订单分摊优惠基础逻辑:一般正常优惠券和满减优惠按照子订单的金额进行分摊,特殊情况如果优惠券是指定商品使用的,只会分摊到对应商品子订单上不分摊。
      */
-    // like -  total_pay_price;niu - goods_money; taobao - order.payment(子订单实付金额,不算主订单分摊金额) | order.total_fee(子订单应付金额,参考使用)
-    private Integer totalPresentPrice;
-    // TODO 芋艿:part_mjz_discount(子订单分摊金额);本质上,totalOriginalPrice - totalPayPrice
+    private Integer orderPartPrice;
     /**
-     * 应付金额(总),单位:分
+     * 分摊后子订单实付金额(总),单位:分
+     *
+     * = {@link #payPrice}
+     * - {@link #orderPartPrice}
+     *
+     * 对应 taobao 的 divide_order_fee 字段
      */
-    // taobao - divide_order_fee (分摊后子订单实付金额);
-    private Integer totalPayPrice;
+    private Integer orderDividePrice;
 
     // ========== 营销基本信息 ==========
-//    /**
-//     * 积分抵扣的金额,单位:分
-//     */
-//    private Integer integralTotal; // like - integral_price;niu - point_money
-//    /**
-//     * 使用的积分
-//     */
-//    private Integer useIntegral; // niu - use_point
 
     // ========== 退款基本信息 ==========
     /**
-     * 退款状态
+     * 退款状态 TODO
      *
      * 枚举 {@link TradeOrderItemRefundStatusEnum}
      */
@@ -148,7 +148,7 @@ public class TradeOrderItemDO extends BaseDO {
     // presentTotal = buyTotal - discountTotal = 24 - 11 = 13
     // 最终 presentPrice = presentTotal / stock = 13 / 3 = 4.33
     /**
-     * 退款总金额,单位:分
+     * 退款总金额,单位:分 TODO
      */
     private Integer refundTotal;
 
@@ -173,42 +173,5 @@ public class TradeOrderItemDO extends BaseDO {
 
     }
 
-    // TODO 芋艿:basket_date 加入购物车时间;
-    // TODO 芋艿:distribution_card_no 推广员使用的推销卡号
-
-    // TODO 待确定:mf
-    // TODO give_integral:赠送积分
-    // TODO is_reply:是否评价,0-未评价,1-已评价
-    // TODO is_sub:是否单独分佣,0-否,1-是
-    // TODO vip_price:会员价
-    // TODO product_type:商品类型:0-普通,1-秒杀,2-砍价,3-拼团,4-视频号
-
-    // TODO 待确定:lf
-    // TODO integral_price:积分抵扣的金额
-    // TODO member_price:会员价格
-    // TODO is_member:是否为会员折扣;0-不是;1-是
-    // TODO member_discount:会员折扣(百分比)
-
-    // TODO goods_info 商品信息
-
-    // TODO integral_price:积分抵扣的金额
-
-    // TODO 待确定:niu
-    // TODO is_virtual '是否是虚拟商品'
-    // TODO goods_class '商品种类(1.实物 2.虚拟3.卡券)'
-    // TODO adjust_money ''调整金额''
-
-    // TODO is_fenxiao 是否分销,
-    // TODO adjust_money 是否分销,
-
-    // TODO delivery_status '配送状态'
-    // TODO delivery_no ''配送单号''
-    // TODO gift_flag '赠品标识'
-    // TODO gift_flag '赠品标识'
-
-    // TODO refund_status '退款状态'
-    // TODO refund_type '退款状态'
-    // TODO 一堆退款字段
-
 }