- GetStoresOrderSaleInfo中的时间从order_created_at至order_finished_at
This commit is contained in:
@@ -140,7 +140,7 @@ func GetStoresOrderSaleInfo(db *DaoDB, storeIDList []int, fromTime time.Time, to
|
||||
CAST(SUM(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t5.pay_percentage > 0, t5.pay_percentage, %d) / 100)) AS SIGNED) earning_price
|
||||
FROM goods_order t1
|
||||
LEFT JOIN store t5 ON t5.id = IF(t1.jx_store_id <> 0, t1.jx_store_id, t1.store_id)
|
||||
WHERE t1.order_created_at >= ? AND t1.order_created_at <= ?
|
||||
WHERE t1.order_finished_at >= ? AND t1.order_finished_at <= ?
|
||||
`, model.DefaultEarningPricePercentage)
|
||||
sqlParams := []interface{}{
|
||||
model.OrderStatusEndBegin,
|
||||
|
||||
Reference in New Issue
Block a user