From ef04ce57881e6a338b10d596c5eb76b2220598bf Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 31 八月 2023 11:16:49 +0800
Subject: [PATCH] 更新版本

---
 user/guns-admin/src/main/java/com/supersavedriving/user/core/intercept/RestApiInteceptor.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/core/intercept/RestApiInteceptor.java b/user/guns-admin/src/main/java/com/supersavedriving/user/core/intercept/RestApiInteceptor.java
index 30ea486..21eb5df 100644
--- a/user/guns-admin/src/main/java/com/supersavedriving/user/core/intercept/RestApiInteceptor.java
+++ b/user/guns-admin/src/main/java/com/supersavedriving/user/core/intercept/RestApiInteceptor.java
@@ -5,6 +5,8 @@
 import com.supersavedriving.user.core.common.exception.BizExceptionEnum;
 import com.supersavedriving.user.core.util.JwtTokenUtil;
 import com.supersavedriving.user.core.util.RenderUtil;
+import com.supersavedriving.user.modular.system.util.ResultUtil;
+import com.supersavedriving.user.modular.system.warpper.ResponseWarpper;
 import io.jsonwebtoken.JwtException;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
@@ -48,12 +50,14 @@
                 }
             } catch (JwtException e) {
                 //有异常就是token解析失败
-                RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage()));
+//                RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage()));
+                RenderUtil.renderJson(response, ResponseWarpper.success(ResultUtil.tokenErr()));
                 return false;
             }
         } else {
             //header没有带Bearer字段
-            RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage()));
+//            RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage()));
+            RenderUtil.renderJson(response, ResponseWarpper.success(ResultUtil.tokenErr()));
             return false;
         }
         return true;

--
Gitblit v1.7.1