From e9f9a68c610a17e72d9ee37dac634ee8412555d7 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 1 Aug 2022 15:28:10 +0800 Subject: [PATCH] add pay --- business/jxstore/cms/order.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 737734db0..d61b2a89e 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -93,16 +93,22 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType, app } ) //支付金额<原金额 + globals.SugarLogger.Debug("order.PayPrice=========================", order.PayPrice) if payPrice < order.PayPrice { order = &model.Order{ + OrderID: orderID, PayPrice: payPrice, PayMethod: 5, //混合支付 } } else { order = &model.Order{ + OrderID: orderID, PayMethod: 2, //微信支付 } } + globals.SugarLogger.Debug("order.OrderID after=========================", order.OrderID) + globals.SugarLogger.Debug("order.PayPrice after=========================", order.PayPrice) + globals.SugarLogger.Debug("order.PayMethod after=========================", order.PayMethod) globals.SugarLogger.Debugf("pay begin……") err = dao.GetEntity(db, order, "OrderID") if order.ID == 0 { @@ -207,6 +213,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, //orderInfo.PayMethod = 5 //混合支付状态 needPay := totalPrice - userBill.AccountBalance //需支付金额 globals.SugarLogger.Debug("orderInfo.PayPrice=================", orderInfo.PayPrice) + globals.SugarLogger.Debug("orderInfo.OrderID=================", orderInfo.OrderID) WxPayParam, err := Pay(ctx, orderInfo.OrderID, payType, vendorPayType, appID, needPay) if err != nil { globals.SugarLogger.Debug("err=================", err)