From 96d364fac4d7d9bef070e0c280488f904ae16431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 9 Nov 2020 15:27:22 +0800 Subject: [PATCH] gy --- business/jxcallback/orderman/orderman_ext.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index b2954410f..879a28dcf 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -705,8 +705,12 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID } saleInfoMap[index] = saleInfo } - if v.EarningType == model.EarningTypeQuote { - saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count) + if beego.BConfig.RunMode == "prod" { + if v.EarningType == model.EarningTypeQuote { + saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count) + } + } else { + saleInfo.RealEarningPrice += v.NewEarningPrice } saleInfo.ShopPrice += v.ShopPrice * int64(v.Count) saleInfo.VendorPrice += v.VendorPrice * int64(v.Count) @@ -715,14 +719,22 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID if v.VendorOrderID == flagVendorOrderID { if k == 0 { saleInfo.EarningPrice = v.NewEarningPrice - if v.EarningType == model.EarningTypePoints { + if beego.BConfig.RunMode == "prod" { + if v.EarningType == model.EarningTypePoints { + saleInfo.RealEarningPrice += v.NewEarningPrice + } + } else { saleInfo.RealEarningPrice += v.NewEarningPrice } } } else { flagVendorOrderID = v.VendorOrderID saleInfo.EarningPrice += v.NewEarningPrice - if v.EarningType == model.EarningTypePoints { + if beego.BConfig.RunMode == "prod" { + if v.EarningType == model.EarningTypePoints { + saleInfo.RealEarningPrice += v.NewEarningPrice + } + } else { saleInfo.RealEarningPrice += v.NewEarningPrice } }