- fix bug in verifyMobileIsBlank
This commit is contained in:
@@ -147,10 +147,14 @@ func verifyMobileIsBlank(db *dao.DaoDB, mobile string) (user *legacymodel.WeiXin
|
||||
userParent := &legacymodel.WeiXins{
|
||||
ID: user.ParentID,
|
||||
}
|
||||
if err = dao.GetEntity(db, userParent, "Tel"); err != nil && err != orm.ErrNoRows {
|
||||
if err = dao.GetEntity(db, userParent); err != nil && err != orm.ErrNoRows {
|
||||
return nil, err
|
||||
}
|
||||
err = fmt.Errorf("%s已经是组长:%s,门店:%d小组成员", mobile, userParent.Tel, userParent.JxStoreID)
|
||||
if err != orm.ErrNoRows {
|
||||
err = fmt.Errorf("%s已经是组长:%s/%s,门店:%d的小组成员", mobile, userParent.Tel, userParent.OpenID, userParent.JxStoreID)
|
||||
} else {
|
||||
err = nil
|
||||
}
|
||||
} else if user.JxStoreID != 0 {
|
||||
err = fmt.Errorf("%s本身已经是门店:%d的组长", mobile, user.JxStoreID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user