From a593d57a336c0778bf5fc4d1dc78cb145c78e1a6 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 5 Jul 2021 18:48:41 +0800 Subject: [PATCH] aa --- business/jxutils/jxutils_cms.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index c416f6ea5..1f93aba03 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -6,6 +6,7 @@ import ( "encoding/base64" "errors" "fmt" + beego "github.com/astaxie/beego/server/web" "image" "image/png" "io/ioutil" @@ -503,17 +504,18 @@ func GetVendorName(vendorID int) (vendorName string) { } func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) { - //TODO 2021-07-05 菜市和果园一样,取低的 - //if beego.BConfig.RunMode == "jxgy" { - earningPrice = salePrice - if salePrice != 0 { - if shopPrice > 0 && shopPrice < earningPrice { - earningPrice = shopPrice + //TODO 2021-07-05 16:50菜市和果园一样,取低的 + //TODO 2021-07-05 18:48 还是改回来 + if beego.BConfig.RunMode == "jxgy" { + earningPrice = salePrice + if salePrice != 0 { + if shopPrice > 0 && shopPrice < earningPrice { + earningPrice = shopPrice + } } + } else { + earningPrice = shopPrice } - //} else { - // earningPrice = shopPrice - //} storePayPercentage = ConstrainPayPercentage(storePayPercentage) if storePayPercentage <= 0 { storePayPercentage = model.DefaultEarningPricePercentage