- NewActStoreSkuMap中要判断是否大于0

This commit is contained in:
gazebo
2019-07-25 08:58:41 +08:00
parent db45cf2051
commit cb4c3387bd

View File

@@ -15,8 +15,8 @@ func NewActStoreSkuMap(actStoreSkuList []*model.ActStoreSku2, isActPrice bool) (
actStoreSkuMap[index] = make(map[int]*model.ActStoreSku2)
}
if actStoreSkuMap[index][v.VendorID] == nil ||
(isActPrice && actStoreSkuMap[index][v.VendorID].ActualActPrice > v.ActualActPrice) ||
(!isActPrice && actStoreSkuMap[index][v.VendorID].EarningPrice > v.EarningPrice) {
(isActPrice && actStoreSkuMap[index][v.VendorID].ActualActPrice > v.ActualActPrice && v.ActualActPrice > 0) ||
(!isActPrice && actStoreSkuMap[index][v.VendorID].EarningPrice > v.EarningPrice && v.EarningPrice > 0) {
actStoreSkuMap[index][v.VendorID] = v
}
}