From 4ff61f9a39c16b9e70d6485ea0adca15ad3039ca Mon Sep 17 00:00:00 2001 From: richboo111 Date: Tue, 26 Jul 2022 18:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E5=BF=AB?= =?UTF-8?q?=E9=80=92=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/order.go | 4 ++-- business/model/dao/dao.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index e9170de58..7450c05a3 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -124,7 +124,7 @@ var ( ) //余额支付 微信补差值 -func PayByBalance(ctx *jxcontext.Context, orderID string, payType, restPrice int, appID, vendorPayType string) (errMsg string, err error) { +func PayByBalance(ctx *jxcontext.Context, orderID string, restPrice, payType int, vendorPayType, appID string) (errMsg string, err error) { var ( db = dao.GetDB() ) @@ -146,7 +146,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, payType, restPrice int } }() if orderInfo.Status == NotPay { - if userBill.AccountBalance > 0 { + if userBill.AccountBalance > 0 && restPrice == 0 { //余额 全款支付 if userBill.AccountBalance > orderInfo.PayPrice && userBill.AccountBalance-orderInfo.PayPrice > 0 { if err = financial.AddExpendUpdateAccount(txDB, userBill, model.BillTypePayByAccountBalance, orderInfo.PayPrice, 0); err != nil { diff --git a/business/model/dao/dao.go b/business/model/dao/dao.go index 6e7d3449c..e2ffca07b 100644 --- a/business/model/dao/dao.go +++ b/business/model/dao/dao.go @@ -206,7 +206,6 @@ func CreateEntity(db *DaoDB, item interface{}) (err error) { if db == nil { db = GetDB() } - globals.SugarLogger.Errorf("==========================进入创建新用户阶段") if _, err = db.Db.Insert(item); err != nil && !IsDuplicateError(err) { globals.SugarLogger.Errorf("CreateEntity %s failed with error:%v", reflect.TypeOf(item).Name(), err) }