From fc5cb88d8bd20002a5eae7c41bdbd2b0c3e64cf6 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 16 Apr 2019 16:10:49 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BA=AC=E4=B8=9C=E8=AE=A2=E5=8D=95SkuID?= =?UTF-8?q?=E7=9A=84=E5=AE=B9=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/financial.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/business/jxcallback/orderman/financial.go b/business/jxcallback/orderman/financial.go index 013f10589..4e0e76898 100644 --- a/business/jxcallback/orderman/financial.go +++ b/business/jxcallback/orderman/financial.go @@ -1,6 +1,8 @@ package orderman import ( + "math" + "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" @@ -95,6 +97,9 @@ func (c *OrderManager) SaveOrderFinancialInfo(order *model.OrderFinancial, opera // 计算单条sku京西应该结算给商家的金额 sku.JxShopMoney = sku.ShopMoneyByCal + sku.JxSubsidyMoney - sku.JxDeductionsMoney order.Skus[0].JxShopMoney += sku.JxShopMoney + if sku.SkuID >= math.MaxInt32 { + sku.SkuID = 0 + } if err = dao.CreateEntity(db, sku); err != nil { if !dao.IsDuplicateError(err) { globals.SugarLogger.Warnf("On SaveOrderSkuFinancialInfo order.VendorOrderID:%s err: order is err", order.VendorOrderID)