mall:调整 trade 订单的设计

pull/2/head
YunaiV 2022-08-12 00:04:05 +08:00
parent face9cae76
commit 00863fdbac
2 changed files with 85 additions and 60 deletions

View File

@ -109,26 +109,43 @@ public class TradeOrderDO extends BaseDO {
private Date payTime; private Date payTime;
// ========== 价格 + 支付基本信息 ========== // ========== 价格 + 支付基本信息 ==========
// 价格文档 - 淘宝https://open.taobao.com/docV3.htm?docId=108471&docType=1
// TODO promotion_details(订单优惠信息明细,商品和订单级优惠一般都在里面)
/** /**
* *
*
* {@link TradeOrderItemDO#getTotalOriginalPrice()}
*/ */
private Integer buyPrice; // niu - goods_money private Integer skuOriginalPrice; // niu - goods_money
/**
*
*
* {@link TradeOrderItemDO#getTotalPromotionPrice()}
*/
private Integer skuPromotionPrice;
/**
*
*
*
*/
private Integer orderPromotionPrice; // niu - promotion_moneytaobao - discount_fee主订单优惠
/** /**
* *
*/ */
private Integer deliveryPrice; // niu - delivery_money private Integer deliveryPrice; // niu - delivery_moneytaobao - post_fee订单邮费
// TODO 芋艿taobao 的trade.adjust_fee/order.adjust_fee调整金额卖家手动修改订单价格官方数据修复等等
/** /**
* *
* *
* presentPrice = buyPrice + deliveryPrice - couponPrice - integralPrice - marketPrice * = {@link #skuOriginalPrice}
* + {@link #deliveryPrice}
* - {@link #skuPromotionPrice}
* - {@link #orderPromotionPrice}
* - {@link #couponPrice}
*/ */
private Integer presentPrice; // niu - order_money private Integer payPrice; // niu - pay_moneytaobao - payment主订单实付金额 | trade.total_fee主订单应付金额参考使用
/**
*
*
* 0
*/
private Integer payPrice; // niu - pay_money
/** /**
* *
* *
@ -137,8 +154,10 @@ public class TradeOrderDO extends BaseDO {
private Long payOrderId; private Long payOrderId;
/** /**
* *
*
* PayChannelEnum
*/ */
private Integer payType; private Integer payChannel;
// ========== 收件 + 物流基本信息 ========== // ========== 收件 + 物流基本信息 ==========
/** /**
@ -226,20 +245,14 @@ public class TradeOrderDO extends BaseDO {
* *
*/ */
private Integer couponPrice; // niu - coupon_money private Integer couponPrice; // niu - coupon_money
/** // /**
* // * 积分抵扣的金额,单位:分
* // */
* // private Integer integralPrice;
*/ // /**
private Integer marketPrice; // niu - promotion_money // * 使用的积分
/** // */
* // private Integer useIntegral;
*/
private Integer integralPrice;
/**
* 使
*/
private Integer useIntegral;
// TODO ========== 待定字段yv ========= // TODO ========== 待定字段yv =========
// TODO cart_id购物车 id // TODO cart_id购物车 id

View File

@ -41,12 +41,18 @@ public class TradeOrderItemDO extends BaseDO {
private Long orderId; private Long orderId;
// ========== 商品基本信息 ========== // ========== 商品基本信息 ==========
/**
* SPU
*
* ProductSkuDO spuId
*/
private Long spuId;
/** /**
* SKU * SKU
* *
* ProductSkuDO id * ProductSkuDO id
*/ */
private Integer skuId; private Long skuId;
/** /**
* JSON * JSON
*/ */
@ -74,46 +80,51 @@ public class TradeOrderItemDO extends BaseDO {
// ========== 价格 + 支付基本信息 ========== // ========== 价格 + 支付基本信息 ==========
/** /**
* *
* *
* ProductSkuDO price * ProductSkuDO price
*/ */
private Integer buyPrice; // like - original_priceniu - costPrice private Integer originalPrice; // like - original_priceniu - costPrice
/** /**
* *
*/
private Integer presentPrice; // like - goods_priceniu - price
/**
*
*/
private Integer buyTotal; // like - total_priceniu - 暂无
/**
*
* *
* presentPrice * count presentTotal * = {@link #originalPrice} * {@link #count}
*
* presentPrice = 8.33 stock = 3 presentTotal 24.99 25
*
*/ */
private Integer presentTotal; // like - total_pay_priceniu - goods_money private Integer totalOriginalPrice; // like - total_priceniu - 暂无
/**
*
*
* 8 50
*/
private Integer totalPromotionPrice; // taobao - order.discount_fee子订单商品优惠
/**
*
*
* = {@link #totalPresentPrice} / {@link #count}
*/
private Integer presentPrice;
/**
*
*
* = {@link #totalOriginalPrice}
* - {@link #totalPromotionPrice}
*/
private Integer totalPresentPrice; // like - total_pay_priceniu - goods_money; taobao - order.payment子订单实付金额不算主订单分摊金额 | order.total_fee子订单应付金额参考使用
// TODO 芋艿part_mjz_discount(子订单分摊金额)本质上totalOriginalPrice - totalPayPrice
/**
*
*/
private Integer totalPayPrice; // taobao - divide_order_fee (分摊后子订单实付金额);
// ========== 营销基本信息 ========== // ========== 营销基本信息 ==========
/** // /**
* // * 积分抵扣的金额,单位:分
*/ // */
private Integer couponTotal; // like - discount_priceniu - coupon_money // private Integer integralTotal; // like - integral_priceniu - point_money
/** // /**
* // * 使用的积分
*/ // */
private Integer marketTotal; // like - discount_priceniu - promotion_money // private Integer useIntegral; // niu - use_point
/**
*
*/
private Integer integralTotal; // like - integral_priceniu - point_money
/**
* 使
*/
private Integer useIntegral; // niu - use_point
// ========== 退款基本信息 ========== // ========== 退款基本信息 ==========
/** /**
@ -193,5 +204,6 @@ public class TradeOrderItemDO extends BaseDO {
// TODO refund_status '退款状态' // TODO refund_status '退款状态'
// TODO refund_type '退款状态' // TODO refund_type '退款状态'
// TODO 一堆退款字段 // TODO 一堆退款字段
} }