作者 yangfu

个人注册 推荐人

... ... @@ -17,6 +17,8 @@ type UserSignUpCommand struct {
Password string `cname:"密码" json:"password" valid:"Required"`
// 密码
SmsCode string `cname:"短信验证码" json:"smsCode" valid:"Required"`
// 推荐人
Referrer string `cname:"推荐人" json:"referrer"`
}
func (companySignUpCommand *UserSignUpCommand) Valid(validation *validation.Validation) {
... ...
... ... @@ -427,6 +427,7 @@ func (svr AuthService) UserSignUp(signUpCommand *command.UserSignUpCommand) (int
Name: signUpCommand.Name,
Phone: signUpCommand.Phone,
Password: signUpCommand.Password,
Referrer: signUpCommand.Referrer,
})
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
... ...
... ... @@ -24,6 +24,8 @@ type (
Phone string `cname:"手机号码" json:"phone" valid:"Required"`
// 密码
Password string `cname:"密码" json:"password" valid:"Required"`
// 推荐人
Referrer string `cname:"推荐人" json:"referrer"`
}
DataAuthUserSignUp struct {
... ...