From 213f6b217ba9eb8f5562adb7e90407a7797a581a Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 24 三月 2023 10:35:37 +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