From 74db22c2363cd4049a03eb14ee73e900bd65b774 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, 8 Mar 2021 14:54:25 +0800 Subject: [PATCH] aa --- business/jxutils/jxutils_cms.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index ed6c506d8..128e9309b 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -17,6 +17,8 @@ import ( "sync" "time" + "github.com/astaxie/beego" + "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" @@ -503,11 +505,15 @@ func GetVendorName(vendorID int) (vendorName string) { } func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) { - earningPrice = salePrice - if salePrice != 0 { - if shopPrice > 0 && shopPrice < earningPrice { - earningPrice = shopPrice + if beego.BConfig.RunMode == "jxgy" { + earningPrice = salePrice + if salePrice != 0 { + if shopPrice > 0 && shopPrice < earningPrice { + earningPrice = shopPrice + } } + } else { + earningPrice = shopPrice } storePayPercentage = ConstrainPayPercentage(storePayPercentage) if storePayPercentage <= 0 {