From adb3c1b6dd3c42bf5155add4280687f6c124b4b4 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:32:17 +0800 Subject: [PATCH] gy --- business/jxcallback/orderman/orderman_ext.go | 30 ++++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index b2954410f..871517d53 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -705,8 +705,14 @@ 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 { + if v.PayPercentage == 100 { + saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count) + } } saleInfo.ShopPrice += v.ShopPrice * int64(v.Count) saleInfo.VendorPrice += v.VendorPrice * int64(v.Count) @@ -715,15 +721,27 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID if v.VendorOrderID == flagVendorOrderID { if k == 0 { saleInfo.EarningPrice = v.NewEarningPrice - if v.EarningType == model.EarningTypePoints { - saleInfo.RealEarningPrice += v.NewEarningPrice + if beego.BConfig.RunMode == "prod" { + if v.EarningType == model.EarningTypePoints { + saleInfo.RealEarningPrice += v.NewEarningPrice + } + } else { + if v.PayPercentage < 100 { + saleInfo.RealEarningPrice += v.NewEarningPrice + } } } } else { flagVendorOrderID = v.VendorOrderID saleInfo.EarningPrice += v.NewEarningPrice - if v.EarningType == model.EarningTypePoints { - saleInfo.RealEarningPrice += v.NewEarningPrice + if beego.BConfig.RunMode == "prod" { + if v.EarningType == model.EarningTypePoints { + saleInfo.RealEarningPrice += v.NewEarningPrice + } + } else { + if v.PayPercentage < 100 { + saleInfo.RealEarningPrice += v.NewEarningPrice + } } }