改动json email名字

This commit is contained in:
eson 2023-07-10 17:24:06 +08:00
parent e16222849c
commit 53175d539c
3 changed files with 15 additions and 8 deletions

View File

@ -33,7 +33,7 @@ func (l *UserLoginLogic) UserLogin(req *types.RequestUserLogin) (resp *basic.Res
m := l.svcCtx.AllModels.FsUser
// 在用户数据表中根据登录名(email)查找用户记录,并返回 UserModel 类型的结构体对象 userModel。
user, err := m.FindUserByEmail(l.ctx, req.Name)
user, err := m.FindUserByEmail(l.ctx, req.Email)
if errors.Is(err, gorm.ErrRecordNotFound) {
return resp.SetStatus(basic.CodeEmailNotFoundErr), ""
}

View File

@ -31,7 +31,7 @@ type RequestBasicInfoForm struct {
}
type RequestUserLogin struct {
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"pwd"`
}
@ -132,11 +132,18 @@ type Auth struct {
RefreshAfter int64 `json:"refreshAfter"`
}
type Pagnation struct {
TotalCount int64 `json:"total_count"`
TotalPage int64 `json:"total_page"`
CurPage int64 `json:"cur_page"`
PageSize int64 `json:"page_size"`
type File struct {
Filename string `fsfile:"filename"`
Header map[string][]string `fsfile:"header"`
Size int64 `fsfile:"size"`
Data []byte `fsfile:"data"`
}
type Meta struct {
TotalCount int64 `json:"totalCount"`
PageCount int64 `json:"pageCount"`
CurrentPage int `json:"currentPage"`
PerPage int `json:"perPage"`
}
// Set 设置Response的Code和Message值

View File

@ -76,7 +76,7 @@ type RequestBasicInfoForm {
// UserAddAddressHandler 用户登录请求结构
type RequestUserLogin {
Name string `json:"name"`
Email string `json:"email"`
Password string `json:"pwd"`
}