From 9a0daa6b22a625ff98cd426d1c289888460f1ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 23 Oct 2020 13:36:47 +0800 Subject: [PATCH] =?UTF-8?q?jds=E8=AE=A2=E5=8D=95=E8=BD=AC=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 11 +++++++++++ business/partner/purchase/jdshop/callback.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 20460608a..340eb7b5a 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1630,6 +1630,17 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int) return "", err } order.Status = model.OrderStatusNew + if order.ActualPayPrice == 0 { + msg, err := jdshop.GetJdsOrder(order.VendorOrderID2) + if err == nil { + if jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment)) == 0 { + order.ActualPayPrice = jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderTotalPrice) + utils.Str2Float64(msg.FreightPrice) - utils.Str2Float64(msg.SellerDiscount)) + } else { + order.ActualPayPrice = jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment)) + } + order.TotalShopMoney = utils.Float64TwoInt64(float64(order.ActualPayPrice) * jdshopapi.JdsPayPercentage) + } + } } else { order.VendorOrderID2 = order.VendorOrderID order.VendorOrderID = utils.Int64ToStr(jxutils.GenOrderNo()) diff --git a/business/partner/purchase/jdshop/callback.go b/business/partner/purchase/jdshop/callback.go index 5814c90e5..9459daa82 100644 --- a/business/partner/purchase/jdshop/callback.go +++ b/business/partner/purchase/jdshop/callback.go @@ -246,7 +246,7 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err } billParams, _ := GetDaDaBillParams(dao.GetDB(), order) if result, err := api.DadaAPI.QueryDeliverFee(billParams); err == nil { - if jxutils.StandardPrice2Int(result.Fee) > 10 { + if result.Fee > 10 { buildOrderTo102919(order) } }