From 7223c6fa86d2f7aa3faace69e3da5dbc41cf37b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 7 May 2020 17:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 3a5b78d78..693db069c 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -382,30 +382,30 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao. globals.SugarLogger.Debugf("skuMultiCountMap", utils.Format4Output(skuMultiCountMap, false)) //TODO 重复购买有活动且结算价大于0的商品需要拆分,第一个商品按结算价,后面的商品按shopprice 或者 saleprice, 2020-05-06 //TODO 京东美团的订单,做活动的商品之前就会拆分出来,所以只做更新,饿百暂时不管, 2020-05-07 - if order.VendorID == model.VendorIDJD || order.VendorID == model.VendorIDMTWM { - for _, v := range orderSkus { - if v.EarningPrice > 0 { - if len(skuMultiCountMap[v.SkuID]) > 1 { - var price = 0 - for _, vv := range skuMultiCountMap[v.SkuID] { - if int(vv.SalePrice) > price { - price = int(vv.SalePrice) - } - } - if price == int(v.SalePrice) { - var earningPrice = 0 - if v.ShopPrice < v.SalePrice { - earningPrice = int(v.ShopPrice) * storePayPercentage / 100 - } else { - earningPrice = int(v.ShopPrice) * storePayPercentage / 100 - } - v.EarningPrice = int64(earningPrice) - globals.SugarLogger.Debugf("TestearningPrice", earningPrice) - } - } - } - } - } + // if order.VendorID == model.VendorIDJD || order.VendorID == model.VendorIDMTWM { + // for _, v := range orderSkus { + // if v.EarningPrice > 0 { + // if len(skuMultiCountMap[v.SkuID]) > 1 { + // var price = 0 + // for _, vv := range skuMultiCountMap[v.SkuID] { + // if int(vv.SalePrice) > price { + // price = int(vv.SalePrice) + // } + // } + // if price == int(v.SalePrice) { + // var earningPrice = 0 + // if v.ShopPrice < v.SalePrice { + // earningPrice = int(v.ShopPrice) * storePayPercentage / 100 + // } else { + // earningPrice = int(v.ShopPrice) * storePayPercentage / 100 + // } + // v.EarningPrice = int64(earningPrice) + // globals.SugarLogger.Debugf("TestearningPrice", earningPrice) + // } + // } + // } + // } + // } } return nil }