mall:新增价格计算的接口

This commit is contained in:
YunaiV
2022-08-16 08:57:18 +08:00
parent 515c0de78d
commit 5948be86a8
11 changed files with 375 additions and 58 deletions

View File

@@ -110,6 +110,8 @@ public class TradeOrderDO extends BaseDO {
// ========== 价格 + 支付基本信息 ==========
// 价格文档 - 淘宝https://open.taobao.com/docV3.htm?docId=108471&docType=1
// 价格文档 - 京东到家https://openo2o.jddj.com/api/getApiDetail/182/4d1494c5e7ac4679bfdaaed950c5bc7f.htm
// 价格文档 - 有赞https://doc.youzanyun.com/detail/API/0/906
// TODO promotion_details(订单优惠信息明细,商品和订单级优惠一般都在里面)
@@ -118,7 +120,8 @@ public class TradeOrderDO extends BaseDO {
*
* 基于 {@link TradeOrderItemDO#getTotalOriginalPrice()} 求和
*/
private Integer skuOriginalPrice; // niu - goods_money
// niu - goods_money
private Integer skuOriginalPrice;
/**
* 商品优惠(总),单位:分
*
@@ -130,11 +133,13 @@ public class TradeOrderDO extends BaseDO {
*
* 例如说:满减折扣;不包括优惠劵、商品优惠
*/
private Integer orderPromotionPrice; // niu - promotion_moneytaobao - discount_fee主订单优惠
// niu - promotion_moneytaobao - discount_fee主订单优惠
private Integer orderPromotionPrice;
/**
* 运费金额,单位:分
*/
private Integer deliveryPrice; // niu - delivery_moneytaobao - post_fee订单邮费
// niu - delivery_moneytaobao - post_fee订单邮费
private Integer deliveryPrice;
// TODO 芋艿taobao 的trade.adjust_fee/order.adjust_fee调整金额卖家手动修改订单价格官方数据修复等等
/**
* 应付金额(总),单位:分
@@ -145,7 +150,8 @@ public class TradeOrderDO extends BaseDO {
* - {@link #orderPromotionPrice}
* - {@link #couponPrice}
*/
private Integer payPrice; // niu - pay_moneytaobao - payment主订单实付金额 | trade.total_fee主订单应付金额参考使用
// niu - pay_moneytaobao - payment主订单实付金额 | trade.total_fee主订单应付金额参考使用
private Integer payPrice;
/**
* 支付订单编号
*
@@ -244,7 +250,8 @@ public class TradeOrderDO extends BaseDO {
/**
* 优惠劵减免金额,单位:分
*/
private Integer couponPrice; // niu - coupon_money
// niu - coupon_money
private Integer couponPrice;
// /**
// * 积分抵扣的金额,单位:分
// */

View File

@@ -84,19 +84,22 @@ public class TradeOrderItemDO extends BaseDO {
*
* 对应 ProductSkuDO 的 price 字段
*/
private Integer originalPrice; // like - original_priceniu - costPrice
// like - original_priceniu - costPrice
private Integer originalPrice;
/**
* 商品原价(总),单位:分
*
* = {@link #originalPrice} * {@link #count}
*/
private Integer totalOriginalPrice; // like - total_priceniu - 暂无
// like - total_priceniu - 暂无
private Integer totalOriginalPrice;
/**
* 商品级优惠(总),单位:分
*
* 例如说“限时折扣”:商品原价的 8 折;商品原价的减 50 元
*/
private Integer totalPromotionPrice; // taobao - order.discount_fee子订单商品优惠
// taobao - order.discount_fee子订单商品优惠
private Integer totalPromotionPrice;
/**
* 最终购买金额(单),单位:分。
*
@@ -109,12 +112,14 @@ public class TradeOrderItemDO extends BaseDO {
* = {@link #totalOriginalPrice}
* - {@link #totalPromotionPrice}
*/
private Integer totalPresentPrice; // like - total_pay_priceniu - goods_money; taobao - order.payment子订单实付金额不算主订单分摊金额 | order.total_fee子订单应付金额参考使用
// like - total_pay_priceniu - goods_money; taobao - order.payment子订单实付金额不算主订单分摊金额 | order.total_fee子订单应付金额参考使用
private Integer totalPresentPrice;
// TODO 芋艿part_mjz_discount(子订单分摊金额)本质上totalOriginalPrice - totalPayPrice
/**
* 应付金额(总),单位:分
*/
private Integer totalPayPrice; // taobao - divide_order_fee (分摊后子订单实付金额);
// taobao - divide_order_fee (分摊后子订单实付金额);
private Integer totalPayPrice;
// ========== 营销基本信息 ==========
// /**