Commit 05614cc0b88025759db6a35d454295f66ef61a21

Authored by YunaiV
1 parent d10f49b6

trade:完善 TradeOrderItemDO 字段

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 {
71 71 */
72 72 private Integer count;
73 73 /**
74   - * 是否评论
  74 + * 是否评论 TODO
75 75 *
76 76 * false - 未评论
77 77 * true - 已评论
... ... @@ -79,61 +79,61 @@ public class TradeOrderItemDO extends BaseDO {
79 79 private Boolean commented;
80 80  
81 81 // ========== 价格 + 支付基本信息 ==========
  82 +
82 83 /**
83   - * 商品原价(单),单位:分
  84 + * 商品原价(总),单位:分
84 85 *
85   - * 对应 ProductSkuDO 的 price 字段
  86 + * = {@link #originalUnitPrice} * {@link #getCount()}
86 87 */
87   - // like - original_price;niu - costPrice
88 88 private Integer originalPrice;
89 89 /**
90   - * 商品原价(总),单位:分
  90 + * 商品原价(单),单位:分
91 91 *
92   - * = {@link #originalPrice} * {@link #count}
  92 + * 对应 ProductSkuDO 的 price 字段
  93 + * 对应 taobao 的 order.price 字段
93 94 */
94   - // like - total_price;niu - 暂无
95   - private Integer totalOriginalPrice;
  95 + private Integer originalUnitPrice;
96 96 /**
97   - * 商品级优惠(总),单位:分
  97 + * 商品优惠(总),单位:分
  98 + *
  99 + * 商品级优惠:对单个商品的,常见如:商品原价的 8 折;商品原价的减 50 元
98 100 *
99   - * 例如说“限时折扣”:商品原价的 8 折;商品原价的减 50 元
  101 + * 对应 taobao 的 order.discount_fee 字段
100 102 */
101   - // taobao - order.discount_fee(子订单商品优惠)
102   - private Integer totalPromotionPrice;
  103 + private Integer discountPrice;
103 104 /**
104   - * 最终购买金额(单),单位:分。
  105 + * 子订单实付金额,不算主订单分摊金额,单位:分
  106 + *
  107 + * = {@link #originalPrice}
  108 + * - {@link #discountPrice}
105 109 *
106   - * = {@link #totalPresentPrice} / {@link #count}
  110 + * 对应 taobao 的 order.payment 字段
107 111 */
108   - private Integer presentPrice;
  112 + private Integer payPrice;
  113 +
109 114 /**
110   - * 最终购买金额(总),单位:分。
  115 + * 子订单分摊金额(总),单位:分
  116 + * 需要分摊 {@link TradeOrderDO#getDiscountPrice()}、{@link TradeOrderDO#getCouponPrice()}、{@link TradeOrderDO#getPointPrice()}
111 117 *
112   - * = {@link #totalOriginalPrice}
113   - * - {@link #totalPromotionPrice}
  118 + * 对应 taobao 的 order.part_mjz_discount 字段
  119 + * 淘宝说明:子订单分摊优惠基础逻辑:一般正常优惠券和满减优惠按照子订单的金额进行分摊,特殊情况如果优惠券是指定商品使用的,只会分摊到对应商品子订单上不分摊。
114 120 */
115   - // like - total_pay_price;niu - goods_money; taobao - order.payment(子订单实付金额,不算主订单分摊金额) | order.total_fee(子订单应付金额,参考使用)
116   - private Integer totalPresentPrice;
117   - // TODO 芋艿:part_mjz_discount(子订单分摊金额);本质上,totalOriginalPrice - totalPayPrice
  121 + private Integer orderPartPrice;
118 122 /**
119   - * 应付金额(总),单位:分
  123 + * 分摊后子订单实付金额(总),单位:分
  124 + *
  125 + * = {@link #payPrice}
  126 + * - {@link #orderPartPrice}
  127 + *
  128 + * 对应 taobao 的 divide_order_fee 字段
120 129 */
121   - // taobao - divide_order_fee (分摊后子订单实付金额);
122   - private Integer totalPayPrice;
  130 + private Integer orderDividePrice;
123 131  
124 132 // ========== 营销基本信息 ==========
125   -// /**
126   -// * 积分抵扣的金额,单位:分
127   -// */
128   -// private Integer integralTotal; // like - integral_price;niu - point_money
129   -// /**
130   -// * 使用的积分
131   -// */
132   -// private Integer useIntegral; // niu - use_point
133 133  
134 134 // ========== 退款基本信息 ==========
135 135 /**
136   - * 退款状态
  136 + * 退款状态 TODO
137 137 *
138 138 * 枚举 {@link TradeOrderItemRefundStatusEnum}
139 139 */
... ... @@ -148,7 +148,7 @@ public class TradeOrderItemDO extends BaseDO {
148 148 // presentTotal = buyTotal - discountTotal = 24 - 11 = 13
149 149 // 最终 presentPrice = presentTotal / stock = 13 / 3 = 4.33
150 150 /**
151   - * 退款总金额,单位:分
  151 + * 退款总金额,单位:分 TODO
152 152 */
153 153 private Integer refundTotal;
154 154  
... ... @@ -173,42 +173,5 @@ public class TradeOrderItemDO extends BaseDO {
173 173  
174 174 }
175 175  
176   - // TODO 芋艿:basket_date 加入购物车时间;
177   - // TODO 芋艿:distribution_card_no 推广员使用的推销卡号
178   -
179   - // TODO 待确定:mf
180   - // TODO give_integral:赠送积分
181   - // TODO is_reply:是否评价,0-未评价,1-已评价
182   - // TODO is_sub:是否单独分佣,0-否,1-是
183   - // TODO vip_price:会员价
184   - // TODO product_type:商品类型:0-普通,1-秒杀,2-砍价,3-拼团,4-视频号
185   -
186   - // TODO 待确定:lf
187   - // TODO integral_price:积分抵扣的金额
188   - // TODO member_price:会员价格
189   - // TODO is_member:是否为会员折扣;0-不是;1-是
190   - // TODO member_discount:会员折扣(百分比)
191   -
192   - // TODO goods_info 商品信息
193   -
194   - // TODO integral_price:积分抵扣的金额
195   -
196   - // TODO 待确定:niu
197   - // TODO is_virtual '是否是虚拟商品'
198   - // TODO goods_class '商品种类(1.实物 2.虚拟3.卡券)'
199   - // TODO adjust_money ''调整金额''
200   -
201   - // TODO is_fenxiao 是否分销,
202   - // TODO adjust_money 是否分销,
203   -
204   - // TODO delivery_status '配送状态'
205   - // TODO delivery_no ''配送单号''
206   - // TODO gift_flag '赠品标识'
207   - // TODO gift_flag '赠品标识'
208   -
209   - // TODO refund_status '退款状态'
210   - // TODO refund_type '退款状态'
211   - // TODO 一堆退款字段
212   -
213 176 }
214 177  
... ...