diff --git a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/core/filter/ModuleAuthenInterceptor.java b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/core/filter/ModuleAuthenInterceptor.java index 98a5b52..ab9b902 100644 --- a/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/core/filter/ModuleAuthenInterceptor.java +++ b/win-framework/win-spring-boot-starter-web/src/main/java/com/win/framework/web/core/filter/ModuleAuthenInterceptor.java @@ -18,13 +18,14 @@ public class ModuleAuthenInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - String endTimeStr = ModuleAuthenUtils.module.getStr(md5.digestHex(request.getRequestURI().split("/")[1]),null); + String moduleName = request.getRequestURI().split("/")[1]; + String endTimeStr = ModuleAuthenUtils.module.getStr(md5.digestHex(moduleName),null); if(endTimeStr == null || "".equals(endTimeStr)){ - throw new Exception("没有当前模块使用权限,请联系服务商缴费开通"); + throw new Exception(String.format("没有【%s】模块使用权限,请联系服务商缴费开通",moduleName)); } LocalDateTime endTime = LocalDateTime.parse(ModuleAuthenUtils.decrypt(endTimeStr,ModuleAuthenUtils.secretKey), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); if (endTime == null || endTime.isBefore(LocalDateTime.now())){ - throw new Exception("权限到期或没有当前模块使用权限,请联系服务商缴费"); + throw new Exception(String.format("【%s】模块权限到期,请联系服务商缴费", moduleName)); } return true; }