fix:身份判断

master
howell 4 years ago
parent c88308cf24
commit 7008680aaa

@ -71,6 +71,9 @@ func (o logic) Create(args ApplyCreate) error {
var u2 user.RecookUserInfoModel
mysql.Db.First(&u2, "mobile = ?", args.Mobile)
if u2.Level >= 2 {
return errors.New("用户已是店铺")
}
flag := u2.Id == 0 || u2.ParentID == u1.Id || (u2.Level == 0 && u2.ParentID == 0)
if !flag {
return errors.New("用户链路不正确")

Loading…
Cancel
Save