|
|
|
@ -35,6 +35,7 @@ func (r *registerUser) UserAdd(c *gin.Context, login *user.Login, info *user.Inf
|
|
|
|
|
}
|
|
|
|
|
level := 0
|
|
|
|
|
var parentID uint = 0
|
|
|
|
|
var rootID uint = 0
|
|
|
|
|
if info.InvitationNo != "" {
|
|
|
|
|
var shareUser user.Information
|
|
|
|
|
// uid := baseCode.Decode(info.InvitationNo)
|
|
|
|
@ -47,6 +48,10 @@ func (r *registerUser) UserAdd(c *gin.Context, login *user.Login, info *user.Inf
|
|
|
|
|
level = 0
|
|
|
|
|
parentID = p.ID
|
|
|
|
|
}
|
|
|
|
|
if p.Level == 10 {
|
|
|
|
|
level = 2
|
|
|
|
|
rootID = p.ID
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -63,6 +68,7 @@ func (r *registerUser) UserAdd(c *gin.Context, login *user.Login, info *user.Inf
|
|
|
|
|
Identifier: time.Now().Format("060102") + baseCode.Encode(uint64(lastId)),
|
|
|
|
|
Level: level,
|
|
|
|
|
ParentID: parentID,
|
|
|
|
|
RootID: rootID,
|
|
|
|
|
InvitationNo: baseCode.Encode(uint64(lastId)),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|