Commit 0b61abbedfd5a9c55e797df5a247ea125a930075

Authored by 王言钊
2 parents bdd2edbd 982e9940

Merge branch 'dev'

src/main/java/com/cnlive/shenhe/ShenheApplication.java
... ... @@ -34,19 +34,19 @@ public class ShenheApplication extends SpringBootServletInitializer {
34 34 * 本机的名称
35 35 */
36 36 @Value("${SERVER_NAME}")
37   - private String SERVER_NAME ;
  37 + private String SERVER_NAME;
38 38  
39 39 /**
40 40 * 登录入口
41 41 */
42 42 @Value("${SERVICE_LOGIN}")
43   - private String SERVICE_LOGIN ;
  43 + private String SERVICE_LOGIN;
44 44  
45 45 /**
46 46 * 登出
47 47 */
48 48 @Value("${SERVICE_LOGINOUT}")
49   - private String SERVICE_LOGINOUT ;
  49 + private String SERVICE_LOGINOUT;
50 50  
51 51 public static void main(String[] args) {
52 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 48 @Value("${SERVICE_LOGIN}")
49 49 private String SERVICE_LOGIN ;
50 50  
  51 + /**
  52 + * 本机的名称
  53 + */
51 54 @Value("${spring.localhost.url}")
52   - private String redirecpageturl;
  55 + private String redirectURL ;
53 56  
54 57 @GetMapping(value = "/{id}")
55 58 @ResponseBody
... ... @@ -77,7 +80,7 @@ public class UsersController extends BaseController {
77 80 sessionUser.setLogo(user.getUser_logo());
78 81 sessionUser.setMaster(user.getMaster());
79 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 86 return "page/error.html";
... ... @@ -86,7 +89,7 @@ public class UsersController extends BaseController {
86 89 @RequestMapping("/logout")
87 90 public String logout(HttpSession session) {
88 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 190 videos.setSpid_desc(shySites.getName() + "(目击者)");
191 191 String source1 = videos.getSource();
192 192 for (ShyActivity activity : activityList) {
193   - if (activity.getId().equals(Integer.valueOf(source1))) {
  193 + if (String.valueOf(activity.getId()).equals(source1)) {
194 194 videos.setSpid_desc(activity.getActivity());
195 195 break;
196 196 }
... ...