fix: 链路

master
howell 4 years ago
parent bb9a4d21e9
commit c49c49d143

@ -69,6 +69,13 @@ func (o logic) Create(args ApplyCreate) error {
return fmt.Errorf("手机格式不正确")
}
var u2 user.RecookUserInfoModel
mysql.Db.First(&u2, "mobile = ?", args.Mobile)
flag := u2.Id == 0 || u2.ParentID == u1.Id
if !flag {
return errors.New("用户链路不正确")
}
parentID := u1.Id
if u1.Level != 10 {
parentID = u1.RootID

Loading…
Cancel
Save