diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/LoginFilter.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/LoginFilter.java index 987496f..141b9e3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/LoginFilter.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/LoginFilter.java @@ -16,6 +16,8 @@ import javax.servlet.*; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; @Order(1) @@ -36,7 +38,14 @@ public class LoginFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { String currentUrl = ((HttpServletRequest) servletRequest).getServletPath(); - if (!currentUrl.equals("/api/app/hospital/list")) { + List filterUrlList = new ArrayList<>(); + filterUrlList.add("/api/app/hospital/list"); + filterUrlList.add("/api/app/patient/makeAnAppointment"); + filterUrlList.add("/api/app/doctor/info"); + filterUrlList.add("/api/app/patient/info"); + filterUrlList.add("/api/app/patient/modify"); + + if (!filterUrlList.contains(currentUrl)) { LoginUser loginUser = userTokenService.getLoginUser((HttpServletRequest) servletRequest); SysUser user = loginUser.getUser(); TDoctor tDoctor = tDoctorService.selectTDoctorByPhone(user.getPhonenumber());