From e1959f5d7f95d1842d75e513ad935749a409f2ff Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Wed, 6 May 2020 19:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=A4=E6=96=A4=E8=AE=A1=E8=BE=83=E5=9B=9E?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 4ea002d8c..857a59ab1 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -365,28 +365,28 @@ func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao. } v.EarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, salePrice, storePayPercentage) //TODO 重复购买有结算价的商品需要拆分,第一个商品按结算价,后面的商品按shopprice 或者 saleprice, 2020-05-06 - if v.Count > 1 { - storeID := 0 - if order.StoreID == 0 { - storeID = order.JxStoreID - } else { - storeID = order.StoreID - } - result, _ := dao.GetEffectiveActStoreSkuInfo(db, 0, nil, 0, []int{storeID}, []int{v.SkuID}, order.OrderCreatedAt, order.OrderCreatedAt) - if len(result) > 0 { - if result[0].EarningPrice != 0 { - sku := v - sku.Count = v.Count - 1 - v.Count = 1 - if v.ShopPrice < v.SalePrice { - sku.EarningPrice = v.ShopPrice - } else { - sku.EarningPrice = v.SalePrice - } - orderSkus = append(orderSkus, sku) - } - } - } + // if v.Count > 1 { + // storeID := 0 + // if order.StoreID == 0 { + // storeID = order.JxStoreID + // } else { + // storeID = order.StoreID + // } + // result, _ := dao.GetEffectiveActStoreSkuInfo(db, 0, nil, 0, []int{storeID}, []int{v.SkuID}, order.OrderCreatedAt, order.OrderCreatedAt) + // if len(result) > 0 { + // if result[0].EarningPrice != 0 { + // sku := v + // sku.Count = v.Count - 1 + // v.Count = 1 + // if v.ShopPrice < v.SalePrice { + // sku.EarningPrice = v.ShopPrice + // } else { + // sku.EarningPrice = v.SalePrice + // } + // orderSkus = append(orderSkus, sku) + // } + // } + // } } // 直营店始终按比例结算,不考虑活动与结算表 if changePriceType != model.StoreChangePriceTypeManagedStore {