mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-11-01 03:28:41 +08:00 
			
		
		
		
	mall:调整 trade 订单的设计
This commit is contained in:
		| @ -109,26 +109,43 @@ public class TradeOrderDO extends BaseDO { | ||||
|     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_money;taobao - discount_fee(主订单优惠) | ||||
|     /** | ||||
|      * 运费金额,单位:分 | ||||
|      */ | ||||
|     private Integer deliveryPrice; // niu - delivery_money; | ||||
|     private Integer deliveryPrice; // niu - delivery_money;taobao - 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; | ||||
|     /** | ||||
|      * 实际已支付金额,单位:分 | ||||
|      * | ||||
|      * 初始时,金额为 0 。等到支付成功后,会进行更新。 | ||||
|      */ | ||||
|     private Integer payPrice; // niu - pay_money; | ||||
|     private Integer payPrice; // niu - pay_money;taobao - payment(主订单实付金额) | trade.total_fee(主订单应付金额,参考使用); | ||||
|     /** | ||||
|      * 支付订单编号 | ||||
|      * | ||||
| @ -137,8 +154,10 @@ public class TradeOrderDO extends BaseDO { | ||||
|     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 marketPrice; // niu - promotion_money; | ||||
|     /** | ||||
|      * 积分抵扣的金额,单位:分 | ||||
|      */ | ||||
|     private Integer integralPrice; | ||||
|     /** | ||||
|      * 使用的积分 | ||||
|      */ | ||||
|     private Integer useIntegral; | ||||
| //    /** | ||||
| //     * 积分抵扣的金额,单位:分 | ||||
| //     */ | ||||
| //    private Integer integralPrice; | ||||
| //    /** | ||||
| //     * 使用的积分 | ||||
| //     */ | ||||
| //    private Integer useIntegral; | ||||
|  | ||||
|     // TODO ========== 待定字段:yv ========= | ||||
|     // TODO cart_id:购物车 id | ||||
|  | ||||
| @ -41,12 +41,18 @@ public class TradeOrderItemDO extends BaseDO { | ||||
|     private Long orderId; | ||||
|  | ||||
|     // ========== 商品基本信息 ========== | ||||
|     /** | ||||
|      * 商品 SPU 编号 | ||||
|      * | ||||
|      * 关联 ProductSkuDO 的 spuId 编号 | ||||
|      */ | ||||
|     private Long spuId; | ||||
|     /** | ||||
|      * 商品 SKU 编号 | ||||
|      * | ||||
|      * 关联 ProductSkuDO 的 id 编号 | ||||
|      */ | ||||
|     private Integer skuId; | ||||
|     private Long skuId; | ||||
|     /** | ||||
|      * 规格值数组,JSON 格式 | ||||
|      */ | ||||
| @ -74,46 +80,51 @@ public class TradeOrderItemDO extends BaseDO { | ||||
|  | ||||
|     // ========== 价格 + 支付基本信息 ========== | ||||
|     /** | ||||
|      * 购买单价,单位:分 | ||||
|      * 商品原价(单),单位:分 | ||||
|      * | ||||
|      * 对应 ProductSkuDO 的 price 字段 | ||||
|      */ | ||||
|     private Integer buyPrice; // like - original_price;niu - costPrice | ||||
|     private Integer originalPrice; // like - original_price;niu - costPrice | ||||
|     /** | ||||
|      * 最终单价,单位:分。 | ||||
|      */ | ||||
|     private Integer presentPrice; // like - goods_price;niu - price | ||||
|     /** | ||||
|      * 购买总金额,单位:分 | ||||
|      */ | ||||
|     private Integer buyTotal; // like - total_price;niu - 暂无 | ||||
|     /** | ||||
|      * 最终总金额,单位:分。 | ||||
|      * 商品原价(总),单位:分 | ||||
|      * | ||||
|      * 注意,presentPrice * count 不一定等于 presentTotal 。 | ||||
|      * 因为,存在无法整除的情况。 | ||||
|      * 举个例子,presentPrice = 8.33 ,stock = 3 的情况,presentTotal 有可能是 24.99 ,也可能是 25 。 | ||||
|      * 所以,需要存储一个该字段。 | ||||
|      * = {@link #originalPrice} * {@link #count} | ||||
|      */ | ||||
|     private Integer presentTotal; // like -  total_pay_price;niu - goods_money | ||||
|     private Integer totalOriginalPrice; // like - total_price;niu - 暂无 | ||||
|     /** | ||||
|      * 商品级优惠(总),单位:分 | ||||
|      * | ||||
|      * 例如说“限时折扣”:商品原价的 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_price;niu - 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_price;niu - coupon_money | ||||
|     /** | ||||
|      * 营销减免金额,单位:分 | ||||
|      */ | ||||
|     private Integer marketTotal; // like - discount_price;niu - promotion_money | ||||
|     /** | ||||
|      * 积分抵扣的金额,单位:分 | ||||
|      */ | ||||
|     private Integer integralTotal; // like - integral_price;niu - point_money | ||||
|     /** | ||||
|      * 使用的积分 | ||||
|      */ | ||||
|     private Integer useIntegral; // niu - use_point | ||||
| //    /** | ||||
| //     * 积分抵扣的金额,单位:分 | ||||
| //     */ | ||||
| //    private Integer integralTotal; // like - integral_price;niu - point_money | ||||
| //    /** | ||||
| //     * 使用的积分 | ||||
| //     */ | ||||
| //    private Integer useIntegral; // niu - use_point | ||||
|  | ||||
|     // ========== 退款基本信息 ========== | ||||
|     /** | ||||
| @ -193,5 +204,6 @@ public class TradeOrderItemDO extends BaseDO { | ||||
|     // TODO refund_status '退款状态' | ||||
|     // TODO refund_type '退款状态' | ||||
|     // TODO 一堆退款字段 | ||||
|  | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV