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 | 19 | HttpSession httpSession=httpServletRequest.getSession(); |
| 20 | 20 | SessionUser sessionUser = (SessionUser)httpSession.getAttribute(SessionUser.getSessionKey()); |
| 21 | 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 | 24 | return false; |
| 24 | 25 | } |
| 25 | 26 | ... | ... |
src/main/java/com/cnlive/shenhe/controller/LiveController.java
| ... | ... | @@ -119,10 +119,11 @@ public class LiveController { |
| 119 | 119 | public Object getListVideos(Model model,String activity_id,String start_date,String end_date, |
| 120 | 120 | String activity_name, Integer activity_status, Integer page,Integer pageSize, |
| 121 | 121 | Integer shenhe_state, String sp_desc, HttpSession session) { |
| 122 | + System.out.println("进入直播内容页"); | |
| 122 | 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 | 127 | Integer spid = sessionUser.getSpid(); |
| 127 | 128 | String userId = sessionUser.getUserId(); |
| 128 | 129 | if (CommonUtils.isNull(page)) page = 1; | ... | ... |