订单新增earningprice2

This commit is contained in:
苏尹岚
2020-03-19 16:34:30 +08:00
parent cb9c465e10
commit b6126857cc
7 changed files with 27 additions and 4 deletions

View File

@@ -26,7 +26,9 @@ type StoresOrderSaleInfo struct {
SalePrice int64 `json:"salePrice"`
ActualPayPrice int64 `json:"actualPayPrice"`
EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱
EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱
EarningPrice2 int64 `json:"earningPrice2"` // 预估结算给门店老板的钱(新规则)
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
}
@@ -41,7 +43,8 @@ type OrderSkuWithActualPayPrice struct {
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
PayPercentage int `json:"payPercentage"`
PayPercentage int `json:"payPercentage"`
EarningPrice2 int64 `json:"earningPrice2"`
}
type tGoodsAndOrder struct {
@@ -356,7 +359,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
// order_finished_at
sql := `
SELECT t1.*,
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money,
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.earning_price2,
t3.pay_percentage
FROM order_sku t1
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id

View File

@@ -64,6 +64,7 @@ type GoodsOrder struct {
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
EarningPrice int64 `json:"earningPrice"` // 结算给门店老板的钱(未扣除可能的三方配送费)
EarningPrice2 int64 `json:"earningPrice2"` // 结算给门店老板的钱(未扣除可能的三方配送费)(新规则)
Weight int `json:"weight"` // 单位为克
VendorUserID string `orm:"column(vendor_user_id);size(48)" json:"vendorUserID"`
UserID string `orm:"column(user_id);size(48);index" json:"userID"`