From 4159a6198eec41f0c51ab39ebd0f1d2ee70ae2ce Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 20 Feb 2020 14:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8ESkuID=E8=B6=85=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E7=9A=84=EF=BC=8C=E6=94=B9=E4=B8=BA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=88=90JxSkuID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/financial.go | 4 ++-- business/jxutils/jxutils.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/business/jxcallback/orderman/financial.go b/business/jxcallback/orderman/financial.go index f253fd30a..e7e915a86 100644 --- a/business/jxcallback/orderman/financial.go +++ b/business/jxcallback/orderman/financial.go @@ -98,7 +98,7 @@ func (c *OrderManager) SaveOrderFinancialInfo(order *model.OrderFinancial, opera sku.JxShopMoney = sku.ShopMoneyByCal + sku.JxSubsidyMoney - sku.JxDeductionsMoney order.Skus[0].JxShopMoney += sku.JxShopMoney if sku.SkuID >= math.MaxInt32 { - sku.SkuID = 0 + sku.SkuID = sku.JxSkuID } if err = dao.CreateEntity(db, sku); err != nil { if !dao.IsDuplicateError(err) { @@ -112,7 +112,7 @@ func (c *OrderManager) SaveOrderFinancialInfo(order *model.OrderFinancial, opera if len(order.Skus) > 0 { sku := order.Skus[0] if sku.SkuID > math.MaxInt32 { - sku.SkuID = 0 + sku.SkuID = sku.JxSkuID } sku.UserMoney = order.SalePriceMoney - order.DiscountMoney - sku.UserMoney sku.PmSubsidyMoney = platOrderGoodsDiscountMoney + order.SelfDeliveryDiscountMoney - sku.PmSubsidyMoney diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index 517882740..160073540 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -524,7 +524,7 @@ func RefreshOrderSkuRelated(order *model.GoodsOrder) *model.GoodsOrder { order.EarningPrice = 0 for _, sku := range order.Skus { if sku.SkuID > math.MaxInt32 { - sku.SkuID = 0 + sku.SkuID = sku.JxSkuID } sku.OrderCreatedAt = order.OrderCreatedAt sku.VendorID = order.VendorID @@ -545,7 +545,7 @@ func RefreshAfsOrderSkuRelated(afsOrder *model.AfsOrder) *model.AfsOrder { afsOrder.PmSkuSubsidyMoney = 0 for _, orderSku := range afsOrder.Skus { if orderSku.SkuID > math.MaxInt32 { - orderSku.SkuID = 0 + orderSku.SkuID = orderSku.JxSkuID } afsOrder.SkuUserMoney += orderSku.UserMoney afsOrder.PmSkuSubsidyMoney += orderSku.PmSkuSubsidyMoney