diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 60ff706f3..a8cb01875 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -655,6 +655,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID } saleInfo.ActualPayPrice += v.ActualPayPrice saleInfo.Count++ + + saleInfo.DistanceFreightMoney += v.DistanceFreightMoney + saleInfo.WaybillTipMoney += v.WaybillTipMoney } orderMap[universalOrderID].SkuCount += v.Count diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 7339adfef..6416c5f3f 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -16,22 +16,27 @@ const ( ) type StoresOrderSaleInfo struct { - StoreID int `orm:"column(store_id)" json:"storeID"` - VendorID int `orm:"column(vendor_id)" json:"vendorID"` - Status int `json:"status"` + StoreID int `orm:"column(store_id)" json:"storeID"` + VendorID int `orm:"column(vendor_id)" json:"vendorID"` + Status int `json:"status"` + Count int `json:"count"` ShopPrice int64 `json:"shopPrice"` VendorPrice int64 `json:"vendorPrice"` SalePrice int64 `json:"salePrice"` ActualPayPrice int64 `json:"actualPayPrice"` - EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱 + EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱 + DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值) + WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费 } type OrderSkuWithActualPayPrice struct { model.OrderSku - ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付 + ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付 + DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值) + WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费 StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid Status int `json:"status"` // 参见OrderStatus*相关的常量定义 @@ -345,7 +350,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt // order_finished_at sql := ` SELECT t1.*, - t2.actual_pay_price, t2.status, IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, + 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, 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