修改密码bug修复

This commit is contained in:
yxh
2020-10-07 21:24:48 +08:00
parent c0e2e1efd9
commit 31c3739520
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -10,13 +10,13 @@ import (
//设置用户状态参数
type StatusReq struct {
Id int `p:"userId" v:"required#用户id不能为空"`
UserStatus uint `p:"status" v:"required#用户状态不能为空"`
Id uint64 `p:"userId" v:"required#用户id不能为空"`
UserStatus uint `p:"status" v:"required#用户状态不能为空"`
}
//重置用户密码状态参数
type ResetPwdReq struct {
Id int `p:"userId" v:"required#用户id不能为空"`
Id uint64 `p:"userId" v:"required#用户id不能为空"`
Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头,只能包含字母、数字和下划线,长度在6~18之间"`
}
+1 -1
View File
@@ -53,7 +53,7 @@ func UpdatePwd(r *ghttp.Request, data *UpdatePwdReq) error {
}
return ResetUserPwd(&user.ResetPwdReq{
Id: currentUser["id"].(int),
Id: gconv.Uint64(currentUser["id"]),
Password: data.NewPassword,
})
}