This commit is contained in:
苏尹岚
2020-11-11 18:08:55 +08:00
parent 8749f1d4be
commit 19c58e4b4a
3 changed files with 64 additions and 359 deletions

View File

@@ -49,6 +49,7 @@ type OrderSkuWithActualPayPrice struct {
OrderPayPercentage int `json:"orderPayPercentage"`
NewEarningPrice int64 `json:"newEarningPrice"`
EarningType int `json:"earningType"`
CityCode int `json:"cityCode"`
}
type tGoodsAndOrder struct {
@@ -377,7 +378,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, t2.earning_type, t2.order_pay_percentage
t3.pay_percentage, t2.earning_type, t2.order_pay_percentage, t3.city_code
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)