改动json email名字
This commit is contained in:
parent
e16222849c
commit
53175d539c
@ -33,7 +33,7 @@ func (l *UserLoginLogic) UserLogin(req *types.RequestUserLogin) (resp *basic.Res
|
|||||||
m := l.svcCtx.AllModels.FsUser
|
m := l.svcCtx.AllModels.FsUser
|
||||||
|
|
||||||
// 在用户数据表中根据登录名(email)查找用户记录,并返回 UserModel 类型的结构体对象 userModel。
|
// 在用户数据表中根据登录名(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) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return resp.SetStatus(basic.CodeEmailNotFoundErr), ""
|
return resp.SetStatus(basic.CodeEmailNotFoundErr), ""
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ type RequestBasicInfoForm struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RequestUserLogin struct {
|
type RequestUserLogin struct {
|
||||||
Name string `json:"name"`
|
Email string `json:"email"`
|
||||||
Password string `json:"pwd"`
|
Password string `json:"pwd"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,11 +132,18 @@ type Auth struct {
|
|||||||
RefreshAfter int64 `json:"refreshAfter"`
|
RefreshAfter int64 `json:"refreshAfter"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Pagnation struct {
|
type File struct {
|
||||||
TotalCount int64 `json:"total_count"`
|
Filename string `fsfile:"filename"`
|
||||||
TotalPage int64 `json:"total_page"`
|
Header map[string][]string `fsfile:"header"`
|
||||||
CurPage int64 `json:"cur_page"`
|
Size int64 `fsfile:"size"`
|
||||||
PageSize int64 `json:"page_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值
|
// Set 设置Response的Code和Message值
|
||||||
|
@ -76,7 +76,7 @@ type RequestBasicInfoForm {
|
|||||||
|
|
||||||
// UserAddAddressHandler 用户登录请求结构
|
// UserAddAddressHandler 用户登录请求结构
|
||||||
type RequestUserLogin {
|
type RequestUserLogin {
|
||||||
Name string `json:"name"`
|
Email string `json:"email"`
|
||||||
Password string `json:"pwd"`
|
Password string `json:"pwd"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user