From 7e7cdce60ed0fa5244c5b8b79e591100b50b9d8e 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 15:51:10 +0800 Subject: [PATCH] aa --- business/model/dao/report.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/model/dao/report.go b/business/model/dao/report.go index baa560631..8651c3bd4 100644 --- a/business/model/dao/report.go +++ b/business/model/dao/report.go @@ -85,7 +85,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate JOIN ( SELECT ss.*, - ss.total_gross_profit1 - ss.afs_price total_gross_profit + ss.earning_price - ss.afs_price earning_price FROM ( SELECT IF(a.jx_store_id <> 0,a.jx_store_id,a.store_id) store_id, @@ -100,7 +100,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate SUM(a.total_shop_money) total_shop_money, SUM(a.pm_subsidy_money) pm_subsidy_money, SUM(IF(a.earning_type = 1, a.earning_price, a.new_earning_price)) earning_price, - SUM(IF(a.order_type = 0,a.total_shop_money-IF(a.earning_type = 1, a.earning_price, a.new_earning_price)-b.desired_fee-a.distance_freight_money-a.waybill_tip_money, 80)) total_gross_profit1, + SUM(IF(a.order_type = 0,a.total_shop_money-IF(a.earning_type = 1, a.earning_price, a.new_earning_price)-b.desired_fee-a.distance_freight_money-a.waybill_tip_money, 80)) total_gross_profit, SUM(d.shop_price) afs_price 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