From b0e4cb04ae7a35e23c576493c54b0ba51b4abc87 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 25 Jul 2019 20:39:56 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DNewActStoreSkuMap?= =?UTF-8?q?=E4=B8=AD=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/jxutils_act.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/business/jxutils/jxutils_act.go b/business/jxutils/jxutils_act.go index 63154d062..7778051e4 100644 --- a/business/jxutils/jxutils_act.go +++ b/business/jxutils/jxutils_act.go @@ -14,9 +14,8 @@ func NewActStoreSkuMap(actStoreSkuList []*model.ActStoreSku2, isActPrice bool) ( if actStoreSkuMap[index] == nil { actStoreSkuMap[index] = make(map[int]*model.ActStoreSku2) } - if actStoreSkuMap[index][v.VendorID] == nil || - (isActPrice && actStoreSkuMap[index][v.VendorID].ActualActPrice > v.ActualActPrice && v.ActualActPrice > 0) || - (!isActPrice && actStoreSkuMap[index][v.VendorID].EarningPrice > v.EarningPrice && v.EarningPrice > 0) { + if (isActPrice && v.ActualActPrice > 0 && (actStoreSkuMap[index][v.VendorID] == nil || actStoreSkuMap[index][v.VendorID].ActualActPrice > v.ActualActPrice)) || + (!isActPrice && v.EarningPrice > 0 && (actStoreSkuMap[index][v.VendorID] == nil || actStoreSkuMap[index][v.VendorID].EarningPrice > v.EarningPrice)) { actStoreSkuMap[index][v.VendorID] = v } }