- updateOrderSkuOtherInfo中固化订单商品的EarningPrice

This commit is contained in:
gazebo
2019-08-29 17:31:21 +08:00
parent 81ae87f5a5
commit 21b66cc482

View File

@@ -320,18 +320,10 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao.
if skuBindInfo.Price == 0 {
globals.SugarLogger.Infof("updateOrderSkuOtherInfo [运营%s]%s订单sku门店价格为零一般原因为没有门店价格信息orderID:%s, StoreID:%d, SkuID:%d, sku:%v", opNumStr, model.VendorChineseNames[order.VendorID], order.VendorOrderID, jxStoreID, v.JxSkuID, v)
}
// v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, storePayPercentage)
v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, storePayPercentage)
}
}
// if skuPriceMap != nil {
// if skuID := jxutils.GetSkuIDFromOrderSku(v); skuID > 0 /*&& v.StoreSubName != ""*/ {
// index := dao.GenSkuPriceMapKey(jxStoreID, v.SkuID)
// if skuPriceMap[index] != nil && skuPriceMap[index].EarningPrice > 0 {
// v.EarningPrice = int64(skuPriceMap[index].EarningPrice)
// }
// }
// } else
if actStoreSkuMap != nil {
if skuID := jxutils.GetSkuIDFromOrderSku(v); skuID > 0 {
if actStoreSku := actStoreSkuMap.GetActStoreSku(jxStoreID, skuID, order.VendorID); actStoreSku != nil {