From c32db3e5464a0103821cf2668d520322375cccf1 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 8 Sep 2022 18:10:05 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8C=BA=E5=9D=97=E6=98=9F=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/block_star_chain_settlement.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rule/block_star_chain_settlement.go b/rule/block_star_chain_settlement.go index 0a50470..5e984ec 100644 --- a/rule/block_star_chain_settlement.go +++ b/rule/block_star_chain_settlement.go @@ -713,7 +713,12 @@ func DealUserCoin(session *xorm.Session, req md.DealUserCoinReq) (err error) { return err } if zhios_order_relate_utils.StrToFloat64(userVirtualCoinFlow.AfterAmout) < 0 { - return errors.New("用户虚拟币积分不足,无法扣除。") + var coin model.VirtualCoin + _, err = session.Where("id = ?", req.CoinId).Get(&coin) + if err != nil { + return err + } + return errors.New("用户" + coin.Name + "不足") } //3、插入 `user_virtual_coin_flow` 记录 _, err = db.UserVirtualCoinFlowInsert(session, &userVirtualCoinFlow)