Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

beetlsql3-dev
Mlxa0324 2 years ago
commit b22766cc4e

@ -663,10 +663,15 @@ public class IndexController {
}
ModelAndView view = new ModelAndView("/login.html");
view.addObject("uSystem", new UniversitiesCollegesJurisdictionExperimentalSystem());
// try {
// response.sendRedirect("http://localhost:8080/Login");
// } catch (IOException e) {
// e.printStackTrace();
// }
return view;
}
// @PostMapping("/login.json")
@PostMapping("/login.json")
@ResponseBody
public JsonResult login(String code, String password, Integer type, Long typeId) {
UniversitiesCollegesJurisdictionExperimentalSystem uSystem = new UniversitiesCollegesJurisdictionExperimentalSystem();
@ -690,7 +695,7 @@ public class IndexController {
info.setCurrentOrg(currentOrg);
if(null != user && !"JT_S_01".equals(user.getJobType1()) ){//非管理员
if(null != type && null != typeId){
// if(null != type && null != typeId){
UniversitiesColleges universitiesColleges = universitiesCollegesService.getByOrgId(user.getOrgId());
if(null != universitiesColleges && ((Integer)1).equals(universitiesColleges.getUniversitiesCollegesStatus())){
uSystem.setUniversitiesCollegesId(universitiesColleges.getUniversitiesCollegesId());
@ -744,8 +749,8 @@ public class IndexController {
}else {
return JsonResult.failMessage("登录失败,此院校不存在");
}
}
return JsonResult.failMessage("登录失败,没有此系统权限");
// }
// return JsonResult.failMessage("登录失败,没有此系统权限");
}else {
// 记录登录信息到session
this.platformService.setLoginUser(info.getUser(), info.getCurrentOrg(), info.getOrgs(), uSystem);
@ -753,7 +758,7 @@ public class IndexController {
return JsonResult.success();
}
@PostMapping("/login.json")
// @PostMapping("/login.json")
@ResponseBody
public JsonResult login2(String code, String password) {
UserLoginInfo info = null;
@ -809,7 +814,12 @@ public class IndexController {
//判断是老师还是学生
if(null != student){//学生
try {
String redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/server"));
String redirectUrl = "";
if(request.getHeader("Referer").contains("/server")){
redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/server"));
}else {
redirectUrl = request.getHeader("Referer").substring(0,request.getHeader("Referer").indexOf("/Login"));
}
String token = getToken(request);
@ -827,29 +837,31 @@ public class IndexController {
if(ApplicationRunnerController.isOnline){
//TODO 根据 uSystem 跳不同的页面
if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用
response.sendRedirect(redirectUrl+"/studentEnd_dsj/index.html");
}else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用
response.sendRedirect(redirectUrl+"/studentEnd_jr/index.html");
}else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用
response.sendRedirect(redirectUrl+"/studentEnd_ch/index.html");
}else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用
response.sendRedirect(redirectUrl+"/studentEnd_sy/index.html");
}else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用
response.sendRedirect(redirectUrl+"/studentEnd_yx/index.html");
}
response.sendRedirect(redirectUrl+"Home");
// if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用
// response.sendRedirect(redirectUrl+"/studentEnd_dsj/index.html");
// }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用
// response.sendRedirect(redirectUrl+"/studentEnd_jr/index.html");
// }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用
// response.sendRedirect(redirectUrl+"/studentEnd_ch/index.html");
// }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用
// response.sendRedirect(redirectUrl+"/studentEnd_sy/index.html");
// }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用
// response.sendRedirect(redirectUrl+"/studentEnd_yx/index.html");
// }
}else {
if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用
response.sendRedirect("http://localhost:8080/studentEnd_dsj/index.html");
}else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用
response.sendRedirect("http://localhost:8080/studentEnd_jr/index.html");
}else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用
response.sendRedirect("http://localhost:8080/studentEnd_ch/index.html");
}else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用
response.sendRedirect("http://localhost:8080/studentEnd_sy/index.html");
}else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用
response.sendRedirect("http://localhost:8080/studentEnd_yx/index.html");
}
response.sendRedirect("http://localhost:8080/Home");
// if(uSystem.getTypeId().toString().equals("1")){ //大数据基础 子应用
// response.sendRedirect("http://localhost:8080/studentEnd_dsj/index.html");
// }else if(uSystem.getTypeId().toString().equals("2")){ //金融大数据 子应用
// response.sendRedirect("http://localhost:8080/studentEnd_jr/index.html");
// }else if(uSystem.getTypeId().toString().equals("3")){ //财会大数据 子应用
// response.sendRedirect("http://localhost:8080/studentEnd_ch/index.html");
// }else if(uSystem.getTypeId().toString().equals("4")){ //商业大数据 子应用
// response.sendRedirect("http://localhost:8080/studentEnd_sy/index.html");
// }else if(uSystem.getTypeId().toString().equals("5")){ //营销大数据 子应用
// response.sendRedirect("http://localhost:8080/studentEnd_yx/index.html");
// }
}
}catch (Exception e){
e.printStackTrace();

Loading…
Cancel
Save