From febda332ad76e4aadb755f19d8cb659f102c0393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 21 Apr 2020 09:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=B9=B3=E5=8F=B0=E8=BF=87?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E4=BB=B7=E6=A0=BC=E7=AD=89=E4=BA=8E0?= =?UTF-8?q?=EF=BC=8C=E6=88=91=E4=BB=AC=E7=9A=84earningprice=E5=B0=B1?= =?UTF-8?q?=E7=AD=89=E4=BA=8E0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 2 +- business/jxutils/jxutils_cms.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 34ef17d53..a69bd8b2a 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1769,7 +1769,7 @@ func ExportShopsHealthInfo(ctx *jxcontext.Context, vendorIDs, storeIDs []int, is func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) { switch step { case 0: - subTask := tasksch.NewParallelTask(fmt.Sprintf("ExportShopHealthInfo2[%s]", model.VendorChineseNames[vendorID]), tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx, + subTask := tasksch.NewParallelTask(fmt.Sprintf("ExportShopHealthInfo2[%s]", model.VendorChineseNames[vendorID]), tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { storeMap := batchItemList[0].(*model.StoreMap) healthInfo, err := ebai.CurPurchaseHandler.GetShopHealthInfo(storeMap.VendorStoreID) diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index 1f4b50e60..e6d99ceba 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -504,8 +504,10 @@ func GetVendorName(vendorID int) (vendorName string) { func CaculateSkuEarningPrice(shopPrice, salePrice int64, storePayPercentage int) (earningPrice int64) { earningPrice = salePrice - if salePrice == 0 || shopPrice > 0 && shopPrice < earningPrice { - earningPrice = shopPrice + if salePrice != 0 { + if shopPrice > 0 && shopPrice < earningPrice { + earningPrice = shopPrice + } } storePayPercentage = ConstrainPayPercentage(storePayPercentage) if storePayPercentage <= 0 {