Commit 0b61abbedfd5a9c55e797df5a247ea125a930075
Merge branch 'dev'
Showing
3 changed files
with
10 additions
and
7 deletions
src/main/java/com/cnlive/shenhe/ShenheApplication.java
| @@ -34,19 +34,19 @@ public class ShenheApplication extends SpringBootServletInitializer { | @@ -34,19 +34,19 @@ public class ShenheApplication extends SpringBootServletInitializer { | ||
| 34 | * 本机的名称 | 34 | * 本机的名称 |
| 35 | */ | 35 | */ |
| 36 | @Value("${SERVER_NAME}") | 36 | @Value("${SERVER_NAME}") |
| 37 | - private String SERVER_NAME ; | 37 | + private String SERVER_NAME; |
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| 40 | * 登录入口 | 40 | * 登录入口 |
| 41 | */ | 41 | */ |
| 42 | @Value("${SERVICE_LOGIN}") | 42 | @Value("${SERVICE_LOGIN}") |
| 43 | - private String SERVICE_LOGIN ; | 43 | + private String SERVICE_LOGIN; |
| 44 | 44 | ||
| 45 | /** | 45 | /** |
| 46 | * 登出 | 46 | * 登出 |
| 47 | */ | 47 | */ |
| 48 | @Value("${SERVICE_LOGINOUT}") | 48 | @Value("${SERVICE_LOGINOUT}") |
| 49 | - private String SERVICE_LOGINOUT ; | 49 | + private String SERVICE_LOGINOUT; |
| 50 | 50 | ||
| 51 | public static void main(String[] args) { | 51 | public static void main(String[] args) { |
| 52 | SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); | 52 | SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); |
src/main/java/com/cnlive/shenhe/controller/UsersController.java
| @@ -48,8 +48,11 @@ public class UsersController extends BaseController { | @@ -48,8 +48,11 @@ public class UsersController extends BaseController { | ||
| 48 | @Value("${SERVICE_LOGIN}") | 48 | @Value("${SERVICE_LOGIN}") |
| 49 | private String SERVICE_LOGIN ; | 49 | private String SERVICE_LOGIN ; |
| 50 | 50 | ||
| 51 | + /** | ||
| 52 | + * 本机的名称 | ||
| 53 | + */ | ||
| 51 | @Value("${spring.localhost.url}") | 54 | @Value("${spring.localhost.url}") |
| 52 | - private String redirecpageturl; | 55 | + private String redirectURL ; |
| 53 | 56 | ||
| 54 | @GetMapping(value = "/{id}") | 57 | @GetMapping(value = "/{id}") |
| 55 | @ResponseBody | 58 | @ResponseBody |
| @@ -77,7 +80,7 @@ public class UsersController extends BaseController { | @@ -77,7 +80,7 @@ public class UsersController extends BaseController { | ||
| 77 | sessionUser.setLogo(user.getUser_logo()); | 80 | sessionUser.setLogo(user.getUser_logo()); |
| 78 | sessionUser.setMaster(user.getMaster()); | 81 | sessionUser.setMaster(user.getMaster()); |
| 79 | request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); | 82 | request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); |
| 80 | - return "redirect:"+redirecpageturl+"/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority="; | 83 | + return "redirect:"+redirectURL+"/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority="; |
| 81 | } | 84 | } |
| 82 | } | 85 | } |
| 83 | return "page/error.html"; | 86 | return "page/error.html"; |
| @@ -86,7 +89,7 @@ public class UsersController extends BaseController { | @@ -86,7 +89,7 @@ public class UsersController extends BaseController { | ||
| 86 | @RequestMapping("/logout") | 89 | @RequestMapping("/logout") |
| 87 | public String logout(HttpSession session) { | 90 | public String logout(HttpSession session) { |
| 88 | session.invalidate(); | 91 | session.invalidate(); |
| 89 | - return "redirect:https://user.cnlive.com/OpenSSO2/logout?service=http://shen.cnlive.com/users/login"; | 92 | + return "redirect:https://user.cnlive.com/OpenSSO2/logout?service="+SERVICE_LOGIN; |
| 90 | } | 93 | } |
| 91 | 94 | ||
| 92 | 95 |
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| @@ -190,7 +190,7 @@ public class VideosController extends BaseController { | @@ -190,7 +190,7 @@ public class VideosController extends BaseController { | ||
| 190 | videos.setSpid_desc(shySites.getName() + "(目击者)"); | 190 | videos.setSpid_desc(shySites.getName() + "(目击者)"); |
| 191 | String source1 = videos.getSource(); | 191 | String source1 = videos.getSource(); |
| 192 | for (ShyActivity activity : activityList) { | 192 | for (ShyActivity activity : activityList) { |
| 193 | - if (activity.getId().equals(Integer.valueOf(source1))) { | 193 | + if (String.valueOf(activity.getId()).equals(source1)) { |
| 194 | videos.setSpid_desc(activity.getActivity()); | 194 | videos.setSpid_desc(activity.getActivity()); |
| 195 | break; | 195 | break; |
| 196 | } | 196 | } |