f
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"bdqr-server/app/main/model"
|
||||
"bdqr-server/common/ctxdata"
|
||||
"bdqr-server/common/xerr"
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
@@ -115,7 +115,7 @@ func (l *ApplyUpgradeLogic) ApplyUpgrade(req *types.ApplyUpgradeReq) (resp *type
|
||||
// canUpgrade 检查是否可以升级
|
||||
func (l *ApplyUpgradeLogic) canUpgrade(fromLevel, toLevel int64, upgradeType int64) bool {
|
||||
if upgradeType == 1 { // 自主付费
|
||||
if fromLevel == 1 { // 普通
|
||||
if fromLevel == 1 { // 白银
|
||||
return toLevel == 2 || toLevel == 3 // 可以升级为黄金或钻石
|
||||
} else if fromLevel == 2 { // 黄金
|
||||
return toLevel == 3 // 可以升级为钻石
|
||||
|
||||
Reference in New Issue
Block a user