From a2bf659e2a15c820c94b966e4c79dee504a385de Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 4 May 2023 15:48:27 +0800 Subject: [PATCH] test --- hdl/hdl_upgrade.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hdl/hdl_upgrade.go b/hdl/hdl_upgrade.go index a2601f4..87cc132 100644 --- a/hdl/hdl_upgrade.go +++ b/hdl/hdl_upgrade.go @@ -11,26 +11,26 @@ import ( "xorm.io/xorm" ) -func CommUpdate(blockStarChain string, eg *xorm.Engine, dbName string, user *model.User, DataDetail md.DataDetail) error { +func CommUpdate(blockStarChain string, eg *xorm.Engine, dbName string, user *model.User, DataDetail md.DataDetail) (error, bool) { uid := DataDetail.Uid //判断有没有审核通过或审核中的记录 has, err := db.UserLevelAuditingFindByUid(eg, zhios_condition_statistics_utils.StrToInt(uid)) if err != nil { - return err + return err, false } if has != nil { var msg = "您已审核通过,请勿重复申请" if has.State == 1 { msg = "正在审核中,请稍后再查看" } - return errors.New(msg) + return errors.New(msg), false } lv := user.Level result := CommUplv(blockStarChain, eg, dbName, user, lv, DataDetail) if result == false { - return errors.New("升级失败") + return errors.New("升级失败"), false } - return nil + return nil, result } func CommUplv(blockStarChain string, eg *xorm.Engine, dbName string, user *model.User, lv int, DataDetail md.DataDetail) bool { levelExpireAt := user.LevelExpireAt