- 去掉对于GetPromotionSkuPriceMap的使用
This commit is contained in:
@@ -489,11 +489,11 @@ func GetStoreAndSkuIDsFromInfo(skuNamesInfo *StoreSkuNamesInfo) (storeIDs, skuID
|
||||
// }
|
||||
|
||||
func updateActPrice4StoreSkuNameNew(db *dao.DaoDB, storeIDs, skuIDs []int, skuNamesInfo *StoreSkuNamesInfo) (err error) {
|
||||
jxSkuPriceMap, err := dao.GetPromotionSkuPriceMap(db, model.VendorIDJX, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
if err != nil {
|
||||
globals.SugarLogger.Errorf("updateActPrice4StoreSkuNameNew can not get sku promotion info for error:%v", err)
|
||||
return err
|
||||
}
|
||||
// jxSkuPriceMap, err := dao.GetPromotionSkuPriceMap(db, model.VendorIDJX, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
// if err != nil {
|
||||
// globals.SugarLogger.Errorf("updateActPrice4StoreSkuNameNew can not get sku promotion info for error:%v", err)
|
||||
// return err
|
||||
// }
|
||||
|
||||
actStoreSkuList, err := dao.GetEffectiveActStoreSkuInfo(db, 0, nil, storeIDs, skuIDs, time.Now(), time.Now())
|
||||
if err != nil {
|
||||
@@ -509,10 +509,11 @@ func updateActPrice4StoreSkuNameNew(db *dao.DaoDB, storeIDs, skuIDs []int, skuNa
|
||||
if actStoreSku != nil {
|
||||
v.ActPrice = int(actStoreSku.ActualActPrice)
|
||||
}
|
||||
index := dao.GenSkuPriceMapKey(skuName.StoreID, v.SkuID)
|
||||
if jxSkuPriceMap[index] != nil {
|
||||
v.EarningPrice = jxSkuPriceMap[index].EarningPrice
|
||||
} else if actStoreSku != nil {
|
||||
// index := dao.GenSkuPriceMapKey(skuName.StoreID, v.SkuID)
|
||||
// if jxSkuPriceMap[index] != nil {
|
||||
// v.EarningPrice = jxSkuPriceMap[index].EarningPrice
|
||||
// } else
|
||||
if actStoreSku != nil {
|
||||
v.EarningPrice = int(actStoreSku.EarningPrice)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user