Commit 58c6942b92234cdc1331a134010d44c372bbc424
1 parent
43b77d52
修改拦截器
Showing
2 changed files
with
6 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/config/MyInterceptor.java
| @@ -19,7 +19,8 @@ public class MyInterceptor implements HandlerInterceptor { | @@ -19,7 +19,8 @@ public class MyInterceptor implements HandlerInterceptor { | ||
| 19 | HttpSession httpSession=httpServletRequest.getSession(); | 19 | HttpSession httpSession=httpServletRequest.getSession(); |
| 20 | SessionUser sessionUser = (SessionUser)httpSession.getAttribute(SessionUser.getSessionKey()); | 20 | SessionUser sessionUser = (SessionUser)httpSession.getAttribute(SessionUser.getSessionKey()); |
| 21 | if(CommonUtils.isNull(sessionUser)){ | 21 | if(CommonUtils.isNull(sessionUser)){ |
| 22 | - httpServletRequest.getRequestDispatcher("/users/login").forward(httpServletRequest, httpServletResponse); | 22 | +// httpServletRequest.getRequestDispatcher("/users/login").forward(httpServletRequest, httpServletResponse); |
| 23 | + httpServletResponse.sendRedirect("/users/login"); | ||
| 23 | return false; | 24 | return false; |
| 24 | } | 25 | } |
| 25 | 26 |
src/main/java/com/cnlive/shenhe/controller/LiveController.java
| @@ -119,10 +119,11 @@ public class LiveController { | @@ -119,10 +119,11 @@ public class LiveController { | ||
| 119 | public Object getListVideos(Model model,String activity_id,String start_date,String end_date, | 119 | public Object getListVideos(Model model,String activity_id,String start_date,String end_date, |
| 120 | String activity_name, Integer activity_status, Integer page,Integer pageSize, | 120 | String activity_name, Integer activity_status, Integer page,Integer pageSize, |
| 121 | Integer shenhe_state, String sp_desc, HttpSession session) { | 121 | Integer shenhe_state, String sp_desc, HttpSession session) { |
| 122 | + System.out.println("进入直播内容页"); | ||
| 122 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | 123 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 123 | - if(CommonUtils.isNull(sessionUser)){ | ||
| 124 | - return "redirect:/users/login"; | ||
| 125 | - } | 124 | +// if(CommonUtils.isNull(sessionUser)){ |
| 125 | +// return "redirect:/users/login"; | ||
| 126 | +// } | ||
| 126 | Integer spid = sessionUser.getSpid(); | 127 | Integer spid = sessionUser.getSpid(); |
| 127 | String userId = sessionUser.getUserId(); | 128 | String userId = sessionUser.getUserId(); |
| 128 | if (CommonUtils.isNull(page)) page = 1; | 129 | if (CommonUtils.isNull(page)) page = 1; |