diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 842e63bcf..ccb41cc44 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -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,