...
|
...
|
@@ -8,15 +8,22 @@ import ( |
|
|
|
|
|
type SendSmsCodeCommand struct {
|
|
|
Phone string `json:"phone" valid:"Required"`
|
|
|
// 0:无 1:需要账号存在于账号系统内,才能发送验证码
|
|
|
Flag int `json:"flag"`
|
|
|
// [1:登录][2:修改密码][3:找回密码][4:注册][5:修改手机号]
|
|
|
Action int `json:"action"`
|
|
|
}
|
|
|
|
|
|
func (orgAddCommand *SendSmsCodeCommand) Valid(validation *validation.Validation) {
|
|
|
func (cmd *SendSmsCodeCommand) Valid(validation *validation.Validation) {
|
|
|
|
|
|
}
|
|
|
|
|
|
func (orgAddCommand *SendSmsCodeCommand) ValidateCommand() error {
|
|
|
func (cmd *SendSmsCodeCommand) ValidateCommand() error {
|
|
|
valid := validation.Validation{}
|
|
|
b, err := valid.Valid(orgAddCommand)
|
|
|
b, err := valid.Valid(cmd)
|
|
|
if cmd.Action == 1 || cmd.Action == 2 || cmd.Action == 3 {
|
|
|
cmd.Flag = 1
|
|
|
}
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
...
|
...
|
|