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) }