+StoresOrderSaleInfo.DistanceFreightMoney, WaybillTipMoney
This commit is contained in:
@@ -655,6 +655,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
}
|
}
|
||||||
saleInfo.ActualPayPrice += v.ActualPayPrice
|
saleInfo.ActualPayPrice += v.ActualPayPrice
|
||||||
saleInfo.Count++
|
saleInfo.Count++
|
||||||
|
|
||||||
|
saleInfo.DistanceFreightMoney += v.DistanceFreightMoney
|
||||||
|
saleInfo.WaybillTipMoney += v.WaybillTipMoney
|
||||||
}
|
}
|
||||||
orderMap[universalOrderID].SkuCount += v.Count
|
orderMap[universalOrderID].SkuCount += v.Count
|
||||||
|
|
||||||
|
|||||||
@@ -16,22 +16,27 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type StoresOrderSaleInfo struct {
|
type StoresOrderSaleInfo struct {
|
||||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
|
|
||||||
Count int `json:"count"`
|
Count int `json:"count"`
|
||||||
ShopPrice int64 `json:"shopPrice"`
|
ShopPrice int64 `json:"shopPrice"`
|
||||||
VendorPrice int64 `json:"vendorPrice"`
|
VendorPrice int64 `json:"vendorPrice"`
|
||||||
SalePrice int64 `json:"salePrice"`
|
SalePrice int64 `json:"salePrice"`
|
||||||
ActualPayPrice int64 `json:"actualPayPrice"`
|
ActualPayPrice int64 `json:"actualPayPrice"`
|
||||||
|
|
||||||
EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱
|
EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱
|
||||||
|
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
||||||
|
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderSkuWithActualPayPrice struct {
|
type OrderSkuWithActualPayPrice struct {
|
||||||
model.OrderSku
|
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
|
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
||||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||||
@@ -345,7 +350,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
|
|||||||
// order_finished_at
|
// order_finished_at
|
||||||
sql := `
|
sql := `
|
||||||
SELECT t1.*,
|
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
|
t3.pay_percentage
|
||||||
FROM order_sku t1
|
FROM order_sku t1
|
||||||
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
||||||
|
|||||||
Reference in New Issue
Block a user