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 + }) +}