diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index aa834c5ec..1c9f3b35d 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -317,7 +317,7 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao. if skuPriceMap != nil { if skuID := jxutils.GetSkuIDFromOrderSku(v); skuID > 0 /*&& v.StoreSubName != ""*/ { index := dao.GenSkuPriceMapKey(jxStoreID, v.SkuID) - if skuPriceMap[index] != nil { + if skuPriceMap[index] != nil && skuPriceMap[index].EarningPrice > 0 { v.EarningPrice = int64(skuPriceMap[index].EarningPrice) } } diff --git a/business/model/dao/promotion.go b/business/model/dao/promotion.go index ddfd9783b..8c5fb0d70 100644 --- a/business/model/dao/promotion.go +++ b/business/model/dao/promotion.go @@ -50,11 +50,9 @@ func GetPromotionSkuPriceMap(db *DaoDB, vendorID int, storeIDs, skuIDs []int, fr } skuPriceMap = make(map[int64]*PromotionStoreSku) for _, v := range skuPriceList { - if v.EarningPrice > 0 { - index := GenSkuPriceMapKey(v.StoreID, v.SkuID) - if skuPriceMap[index] == nil || v.EarningPrice < skuPriceMap[index].EarningPrice { - skuPriceMap[index] = v - } + index := GenSkuPriceMapKey(v.StoreID, v.SkuID) + if true /*skuPriceMap[index] == nil || v.EarningPrice < skuPriceMap[index].EarningPrice*/ { + skuPriceMap[index] = v } } return skuPriceMap, err