f
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"bdqr-server/app/main/model"
|
||||
"bdqr-server/common/ctxdata"
|
||||
"bdqr-server/common/globalkey"
|
||||
"bdqr-server/common/xerr"
|
||||
"bdqr-server/pkg/lzkit/crypto"
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
"bdqr-server/app/main/model"
|
||||
"bdqr-server/common/ctxdata"
|
||||
"bdqr-server/common/globalkey"
|
||||
"bdqr-server/common/xerr"
|
||||
"bdqr-server/pkg/lzkit/crypto"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
@@ -289,8 +289,8 @@ func (l *RegisterByInviteCodeLogic) RegisterByInviteCode(req *types.RegisterByIn
|
||||
}
|
||||
l.Infof("[RegisterByInviteCode] 钻石代理创建成功, agentId: %s, 设置为团队首领", agentID)
|
||||
} else {
|
||||
// 普通/黄金代理,但没有上级(异常情况)
|
||||
l.Infof("[RegisterByInviteCode] 普通/黄金代理,无上级(异常情况), level: %d", targetLevel)
|
||||
// 白银/黄金代理,但没有上级(异常情况)
|
||||
l.Infof("[RegisterByInviteCode] 白银/黄金代理,无上级(异常情况), level: %d", targetLevel)
|
||||
newAgent.AgentCode = 0
|
||||
_, err = l.svcCtx.AgentModel.Insert(transCtx, session, newAgent)
|
||||
if err != nil {
|
||||
@@ -311,7 +311,7 @@ func (l *RegisterByInviteCodeLogic) RegisterByInviteCode(req *types.RegisterByIn
|
||||
|
||||
// 8. 更新邀请码状态
|
||||
// 钻石级别的邀请码只能使用一次,使用后立即失效
|
||||
// 普通级别的邀请码可以无限使用,不更新状态
|
||||
// 白银级别的邀请码可以无限使用,不更新状态
|
||||
if inviteCodeModel != nil {
|
||||
if targetLevel == 3 {
|
||||
// 钻石邀请码:使用后失效
|
||||
@@ -361,7 +361,7 @@ func (l *RegisterByInviteCodeLogic) RegisterByInviteCode(req *types.RegisterByIn
|
||||
levelName := ""
|
||||
switch agentLevel {
|
||||
case 1:
|
||||
levelName = "普通"
|
||||
levelName = "白银"
|
||||
case 2:
|
||||
levelName = "黄金"
|
||||
case 3:
|
||||
|
||||
Reference in New Issue
Block a user