From 8f95be2ba59769e09d5a94cc2ff4b7d94941087f Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Mon, 10 Jul 2023 17:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=99=BB=E5=BD=95=E6=88=90?= =?UTF-8?q?=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/gmodel/fs_user_logic.go | 2 +- server/home-user-auth/internal/types/types.go | 2 +- server_api/home-user-auth.api | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 增加地址结构