From 2812fa1f0855cbe5f92bd9e221d78e034c33a291 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 8 Aug 2022 14:23:17 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=85=85=E5=80=BC=E5=88=B0=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/order.go | 10 +++++++--- business/jxstore/financial/financial.go | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 043114c97..97eb49913 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -162,9 +162,13 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, } if orderInfo.Status == NotPay { //需要充值余额支付的方式//todo 后续添加 - //if orderInfo.OrderType == 6 { - // - //} + if orderInfo.OrderType == 6 { + WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, orderInfo.PayPrice) + if err != nil { + return nil, "微信支付失败:", err + } + return WxPayParam, "", err + } // (3)使用余额且 余额大于支付金额 //快递混合支付 if orderInfo.OrderType == 3 { diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index f025414a3..173cce99f 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -349,6 +349,10 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) { if err := dao.UpdateUserBill(order.UserID, order.PayPrice); err != nil { return err } + order.Status = 110 + if _, err := dao.UpdateEntity(db, order, "Status"); err != nil { + return err + } } } else { globals.SugarLogger.Debugf("onTLpayFinished msg:%s, err:%v", utils.Format4Output(call, true), err)