From 51c7478b940153e0a73052fba03425acd28c60b9 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Wed, 7 Jun 2023 12:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home-user-auth/internal/logic/gettypelogic.go | 1 - home-user-auth/internal/logic/userbasicinfologic.go | 1 - home-user-auth/internal/logic/userloginlogic.go | 1 - 3 files changed, 3 deletions(-) diff --git a/home-user-auth/internal/logic/gettypelogic.go b/home-user-auth/internal/logic/gettypelogic.go index fc7e4aa6..7186460b 100644 --- a/home-user-auth/internal/logic/gettypelogic.go +++ b/home-user-auth/internal/logic/gettypelogic.go @@ -31,6 +31,5 @@ func (l *GetTypeLogic) GetType(req *types.Request) (resp *types.Response) { logx.Error(err) return } - return resp.SetStatus(basic.CodeOK, "success", data) } diff --git a/home-user-auth/internal/logic/userbasicinfologic.go b/home-user-auth/internal/logic/userbasicinfologic.go index c52ef24d..dca8ae67 100644 --- a/home-user-auth/internal/logic/userbasicinfologic.go +++ b/home-user-auth/internal/logic/userbasicinfologic.go @@ -33,7 +33,6 @@ func (l *UserBasicInfoLogic) UserBasicInfo(req *types.Request) (resp *types.Resp fsUserModel, err := model.NewFsUserModel(l.svcCtx.MysqlConn).FindOne(l.ctx, loginInfo.UserId) if err != nil { logx.Error(err) - return resp.Set(510, err.Error()) } diff --git a/home-user-auth/internal/logic/userloginlogic.go b/home-user-auth/internal/logic/userloginlogic.go index 2694b5d8..7baa6d3f 100644 --- a/home-user-auth/internal/logic/userloginlogic.go +++ b/home-user-auth/internal/logic/userloginlogic.go @@ -39,7 +39,6 @@ func (l *UserLoginLogic) genJwtToken(accessSecret string, accessExpire, nowSec, } func (l *UserLoginLogic) UserLogin(req *types.RequestUserLogin) (resp *types.Response, jwtToken string) { - // 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error") userModel, err := model.NewFsUserModel(l.svcCtx.MysqlConn).FindOneByEmail(l.ctx, req.Name) if err == model.ErrNotFound {