From 572f7206b5ca22c563971b43a1bff9be761a9616 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 31 Aug 2021 16:25:22 +0800 Subject: [PATCH] user --- business/auth2/auth2.go | 11 +++++++++++ controllers/auth2.go | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 705fa3332..eeed650c3 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/base64" "errors" + "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "regexp" "strings" "time" @@ -495,3 +496,13 @@ func DeletedTokenInfoWithoutParam(authInfo *AuthInfo) (err error) { } return err } + +type UserInfo struct { + model.User + WxInfo string `json:"wxInfo"` + BrandMaps string `json:"brandMaps"` +} + +func GetUserInfo(ctx *jxcontext.Context) (userInfo *UserInfo, err error) { + return nil, err +} diff --git a/controllers/auth2.go b/controllers/auth2.go index d195230d1..2ea828f14 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -433,3 +433,16 @@ func (c *Auth2Controller) GetUserByMiniInfo() { return retVal, "", err }) } + +// @Title 得到自己登录的信息 +// @Description 得到自己登录的信息 +// @Param token header string true "认证token" +// @Success 200 {object} controllers.CallResult +// @Failure 200 {object} controllers.CallResult +// @router /GetUserInfo [get] +func (c *Auth2Controller) GetUserInfo() { + c.callGetUserInfo(func(params *tAuth2GetUserInfoParams) (retVal interface{}, errCode string, err error) { + retVal, err = auth2.GetUserInfo(params.Ctx) + return retVal, "", err + }) +}