From 70ac32e83331b221fa2ea7548e4d271d28b8c372 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Fri, 13 Aug 2021 17:18:14 +0800 Subject: [PATCH] aa --- business/model/dao/store_sku.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 2fe104c39..484ad4935 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -1470,10 +1470,15 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI } if (actVendorID == -1 || actVendorID == model.VendorIDMTWM) && v.ActPrice == 0 { - mtact := mtactMap[skuName.StoreID][v.SkuID] - v.ActPrice = int(jxutils.StandardPrice2Int(mtact.ActPrice)) - v.ActType = mtact.ActType - v.ActID = int(utils.Str2Int64(mtact.ItemID) % 1000) + if mtactMap != nil { + mtact := mtactMap[skuName.StoreID][v.SkuID] + if mtact != nil { + v.ActPrice = int(jxutils.StandardPrice2Int(mtact.ActPrice)) + v.ActType = mtact.ActType + v.ActID = int(utils.Str2Int64(mtact.ItemID) % 1000) + v.EarningPrice = int(jxutils.StandardPrice2Int(mtact.OriginPrice)) + } + } } if globals.IsStoreSkuAct {