门店营业数据

This commit is contained in:
苏尹岚
2020-07-28 10:35:00 +08:00
parent 1161b44c4d
commit c4ea35efa0
2 changed files with 9 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ type StoresOrderSaleInfo struct {
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
RealEarningPrice int64 `json:"realEarningPrice"`
}
type OrderSkuWithActualPayPrice struct {
@@ -45,6 +47,7 @@ type OrderSkuWithActualPayPrice struct {
PayPercentage int `json:"payPercentage"`
NewEarningPrice int64 `json:"newEarningPrice"`
EarningType int `json:"earningType"`
}
type tGoodsAndOrder struct {
@@ -373,7 +376,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
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, t2.new_earning_price,
t3.pay_percentage
t3.pay_percentage, t2.earning_type
FROM order_sku t1
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
LEFT JOIN store t3 ON t3.id = IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id)