From dd9b616371253eeee83a4793b26bac6ae34b0477 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 3 Aug 2022 17:10:30 +0800 Subject: [PATCH] pay --- business/jxstore/cms/order.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index a846a4a7b..9791db521 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -185,10 +185,6 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, // (3)使用余额且 余额大于支付金额 if userBill.AccountBalance > 0 && userBill.AccountBalance > orderInfo.PayPrice && isChoose == Choose { globals.SugarLogger.Debug("进入余额支付部分") - var order = &model.Order{ - PayPrice: orderInfo.PayPrice, - PayMethod: 1, //余额支付 - } //txDB, _ := dao.Begin(db) //defer func() { // if r := recover(); r != nil { @@ -197,6 +193,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, // dao.Commit(db, txDB) //}() //增加账单 余额减去相应金额 + globals.SugarLogger.Debug("增加账单 余额减去相应金额") money := userBill.AccountBalance - orderInfo.PayPrice if err = dao.UpdateUserBill(userBill.UserID, money); err != nil { return nil, "余额支付失败", err @@ -206,8 +203,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, // return nil, "使用余额支付失败:", err //} //更新订单状态 - order.Status = 110 - order.PayMethod = 1 + globals.SugarLogger.Debug("更新订单状态") if _, err := dao.SetOrderStatus(orderInfo.PayPrice, 1, 110, orderID); err != nil { return nil, "更新order状态失败", err }