diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index f1e21cd1..59edcfb8 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -23,7 +23,7 @@ type UserBasicInfoForSave struct { } func (u *FsUserModel) FindUserByEmail(ctx context.Context, emailname string) (resp FsUser, err error) { - err = u.db.WithContext(ctx).Model(&FsUser{}).Where("`email` = ?", emailname).First(&resp).Error + err = u.db.WithContext(ctx).Model(&FsUser{}).Where("`email` = ?", emailname).Take(&resp).Error return resp, err } diff --git a/server/home-user-auth/internal/types/types.go b/server/home-user-auth/internal/types/types.go index 8640c293..c29a6734 100644 --- a/server/home-user-auth/internal/types/types.go +++ b/server/home-user-auth/internal/types/types.go @@ -32,7 +32,7 @@ type RequestBasicInfoForm struct { type RequestUserLogin struct { Email string `json:"email"` - Password string `json:"pwd"` + Password string `json:"password"` } type RequestAddAddress struct { diff --git a/server_api/home-user-auth.api b/server_api/home-user-auth.api index 6d6335c7..f0253929 100644 --- a/server_api/home-user-auth.api +++ b/server_api/home-user-auth.api @@ -77,7 +77,7 @@ type RequestBasicInfoForm { // UserAddAddressHandler 用户登录请求结构 type RequestUserLogin { Email string `json:"email"` - Password string `json:"pwd"` + Password string `json:"password"` } // RequestAddAddress 增加地址结构