fix
This commit is contained in:
parent
8c30648d3e
commit
a4fe298420
|
@ -70,10 +70,14 @@ func ParseJwtToken(r *http.Request, svcCtx any) (*auth.UserInfo, error) {
|
|||
if info != nil {
|
||||
if info.IsUser() {
|
||||
// us, err := state.GetUserState(info.UserId) //获取缓存的用户状态
|
||||
log.Println(svcCtx)
|
||||
|
||||
rsvcCtx := reflect.ValueOf(svcCtx)
|
||||
log.Println(rsvcCtx, rsvcCtx.Type())
|
||||
if rsvcCtx.Kind() == reflect.Ptr {
|
||||
rsvcCtx = rsvcCtx.Elem()
|
||||
}
|
||||
|
||||
ctxValue := rsvcCtx.FieldByName("MysqlConn")
|
||||
gdb := ctxValue.Interface().(*gorm.DB)
|
||||
us, err := shared.GetUserState(info.UserId, gdb)
|
||||
|
|
Loading…
Reference in New Issue
Block a user