From 9ae33352063f8582a35592218630cbabde10ce07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 19 Mar 2021 11:40:54 +0800 Subject: [PATCH] aa --- business/model/dao/report.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/model/dao/report.go b/business/model/dao/report.go index 9e84028e1..b1f3c7ddb 100644 --- a/business/model/dao/report.go +++ b/business/model/dao/report.go @@ -96,14 +96,14 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time, SUM(IF(a.vendor_id = a.waybill_vendor_id,waybill_tip_money,0)) waybill_tip_money, SUM(total_shop_money) total_shop_money, SUM(pm_subsidy_money) pm_subsidy_money, - SUM(earning_price) earning_price, - SUM(total_shop_money-earning_price-desired_fee-distance_freight_money-waybill_tip_money-80) total_gross_profit + SUM(new_earning_price) earning_price, + SUM(total_shop_money-new_earning_price-desired_fee-distance_freight_money-waybill_tip_money-80) total_gross_profit FROM goods_order a LEFT JOIN waybill b ON IF(a.waybill_vendor_id = -1,a.vendor_order_id,a.vendor_waybill_id) = b.vendor_waybill_id - WHERE a.status <> ? + WHERE a.status = ? ` sqlParams := []interface{}{ - model.OrderStatusCanceled, //排除已取消的订单 + model.OrderStatusFinished, } if !utils.IsTimeZero(fromDate) && !utils.IsTimeZero(toDate) { sql += ` AND a.order_created_at BETWEEN ? AND ?`