diff --git a/server/home-user-auth/internal/logic/userloginlogic.go b/server/home-user-auth/internal/logic/userloginlogic.go index 98d17c06..65ec96ce 100644 --- a/server/home-user-auth/internal/logic/userloginlogic.go +++ b/server/home-user-auth/internal/logic/userloginlogic.go @@ -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), "" } diff --git a/server/home-user-auth/internal/types/types.go b/server/home-user-auth/internal/types/types.go index 26ad0b3a..8640c293 100644 --- a/server/home-user-auth/internal/types/types.go +++ b/server/home-user-auth/internal/types/types.go @@ -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值 diff --git a/server_api/home-user-auth.api b/server_api/home-user-auth.api index aeef3cae..6d6335c7 100644 --- a/server_api/home-user-auth.api +++ b/server_api/home-user-auth.api @@ -76,7 +76,7 @@ type RequestBasicInfoForm { // UserAddAddressHandler 用户登录请求结构 type RequestUserLogin { - Name string `json:"name"` + Email string `json:"email"` Password string `json:"pwd"` }