From 16fa4f09ed20f3197101dec1ab1c6d1622ba68eb Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 28 Jul 2022 13:46:14 +0800 Subject: [PATCH] pay log --- business/jxstore/cms/order.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 5111dea5d..b81d2d663 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -150,6 +150,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int }() if orderInfo.Status == NotPay { globals.SugarLogger.Debug("进入账单未支付") + globals.SugarLogger.Debug("user_bill.balance==================", userBill.AccountBalance) if userBill.AccountBalance > 0 && restPrice == 0 { //余额 全款支付 globals.SugarLogger.Debug("进入余额支付部分") @@ -159,7 +160,8 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int return "使用余额支付失败:", err } orderInfo.Status = AlreadyPay - } else { + } + if restPrice != 0 { //需支付部分 //restPrice := orderInfo.PayPrice - userBill.AccountBalance globals.SugarLogger.Debug("进入混合支付部分") @@ -175,6 +177,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int return "余额修改失败:", err } //增加一条用户账单 + globals.SugarLogger.Debug("开始创建用户账单") if err = financial.AddBillExpend(txDB, userBill.BillID, model.BillTypePayByAccountBalance, orderInfo.PayPrice, 0); err != nil { globals.SugarLogger.Debug("创建账单失败") dao.Rollback(db, txDB)