feat:完善入驻信息管理

This commit is contained in:
henry
2021-12-03 10:08:23 +08:00
parent 199e6f0669
commit d9cbdd2486
26 changed files with 208 additions and 126 deletions

View File

@ -31,8 +31,8 @@ func (c *RegisterParams) checkCaptcha() (bool, error) {
func (c *RegisterParams) checkUserExist(mUserInstance *model2.UserInstance, local string) (bool, error) {
var count int64
if err := model2.Count(mUserInstance, &count, model2.NewWhere("mobile", c.Mobile),
model2.NewWhere("local", local)); err != nil {
if err := model2.Count(mUserInstance, &count, model2.NewWhere("mobile", c.Mobile)); //model2.NewWhere("local", local)
err != nil {
return false, err
}
return count <= 0, nil
@ -60,7 +60,6 @@ func (c *Register) Launch(params *RegisterParams) (*InstanceLoginReturn, error)
} else if !pass {
return nil, errors.New("当前手机号码已注册")
}
mUserInstance.Local.Local = c.local
mUserInstance.Source = model2.UserInstanceSourceForLocal
mUserInstance.Password = utils.GetRandomString(12)
mUserInstance.Mobile = params.Mobile