- 修复NewActStoreSkuMap中的BUG
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user