zhangqian
2023-10-13 7438f17c0b3a9f79ee5890c554bedc64c362859b
middleware/jwt.go
@@ -105,11 +105,14 @@
         c.Next()
         return
      }
      c.Set("claims", claims)
      userInfo := service.GetUserBaseCache(claims.UserId)
      c.Set("user_id", userInfo.UserId)
      c.Set("user_name", userInfo.NickName)
      if userInfo == nil {
         SyncUserInfo()
         userInfo = service.GetUserBaseCache(claims.UserId)
      }
      claims.CrmUserId = userInfo.UserId
      claims.NickName = userInfo.NickName
      c.Set("claims", claims)
      if CheckAuth(c.Request.RequestURI, token) {
         c.Next()
      } else {