This commit is contained in:
suyl
2021-08-18 15:04:08 +08:00
parent dbb0245e38
commit 0d9481df07

View File

@@ -1495,7 +1495,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
}
if (actVendorID == -1 || actVendorID == model.VendorIDMTWM) && v.ActPrice == 0 {
if mtactMap != nil {
if len(mtactMap) > 0 {
mtact := mtactMap[skuName.StoreID][v.SkuID]
if mtact != nil {
v.ActPrice = int(jxutils.StandardPrice2Int(mtact.ActPrice))
@@ -1507,9 +1507,9 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
}
if actVendorMap[model.VendorIDMTWM] == nil {
if mtactMap != nil {
fmt.Println("1111111111111111111111", mtactMap)
if len(mtactMap) > 0 {
mtact := mtactMap[skuName.StoreID][v.SkuID]
if mtact != nil {
v.VendorActMaps = append(v.VendorActMaps, &VendorActMap{
ActID: mtact.ItemID,
ActType: mtact.ActType,
@@ -1518,9 +1518,10 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
})
}
}
}
if (actVendorID == -1 || actVendorID == model.VendorIDEBAI) && v.ActPrice == 0 {
if ebaiactMap != nil {
if len(ebaiactMap) > 0 {
ebaiact := ebaiactMap[skuName.StoreID][v.SkuID]
if ebaiact != nil {
v.ActPrice = int(jxutils.StandardPrice2Int(ebaiact.ActPrice))
@@ -1532,8 +1533,9 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
}
if actVendorMap[model.VendorIDEBAI] == nil {
if ebaiactMap != nil {
if len(ebaiactMap) > 0 {
ebaiact := ebaiactMap[skuName.StoreID][v.SkuID]
if ebaiact != nil {
v.VendorActMaps = append(v.VendorActMaps, &VendorActMap{
ActID: ebaiact.ActID,
ActType: model.ActSkuDirectDown,
@@ -1542,6 +1544,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
})
}
}
}
if globals.IsStoreSkuAct {
v.VendorInfoMap = make(map[int]*StoreSkuVendorInfo)