瀏覽代碼

test

master
huangjiajun 1 年之前
父節點
當前提交
a2bf659e2a
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      hdl/hdl_upgrade.go

+ 5
- 5
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


Loading…
取消
儲存