From 751b1b694273240d0b08546cb3c266e0e0ad5b40 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 1 Sep 2022 16:51:36 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v2.1.0=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/db_user_virtual_amount.go | 1 + svc/svc_block_star_chain_settlement.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/db/db_user_virtual_amount.go b/db/db_user_virtual_amount.go index 05c1893..663214f 100644 --- a/db/db_user_virtual_amount.go +++ b/db/db_user_virtual_amount.go @@ -90,6 +90,7 @@ func GetUserVirtualWalletWithSession(session *xorm.Session, uid, coinId int) (*m if err != nil || one == 0 { return nil, err } + return &UserVirtualWallet, nil } return nil, errors.New("获取用户虚拟币钱包失败") } diff --git a/svc/svc_block_star_chain_settlement.go b/svc/svc_block_star_chain_settlement.go index 2e4b06c..d57b43d 100644 --- a/svc/svc_block_star_chain_settlement.go +++ b/svc/svc_block_star_chain_settlement.go @@ -17,9 +17,9 @@ func GetUserCoinAmount(session *xorm.Session, masterId string, coinId, uid int) if err != nil { if err.Error() == "redigo: nil returned" { userVirtualAmount, err := db.GetUserVirtualWalletWithSession(session, uid, coinId) - if err != nil { - return amount, err - } + //if err != nil { + // return amount, err + //} if userVirtualAmount == nil { amount = "0" } else {