|
|
|
@ -24,6 +24,7 @@ import com.ibeetl.admin.core.util.TimeTool;
|
|
|
|
|
import com.ibeetl.admin.core.util.Tool;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonReturnCode;
|
|
|
|
|
import com.ibeetl.jlw.dao.UniversitiesCollegesDao;
|
|
|
|
|
import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.service.*;
|
|
|
|
|
import com.ibeetl.jlw.web.query.CompetitionQuery;
|
|
|
|
@ -48,6 +49,7 @@ import java.util.*;
|
|
|
|
|
import static cn.jlw.Interceptor.AuthenticationInterceptor.getToken;
|
|
|
|
|
import static cn.jlw.Interceptor.AuthenticationInterceptor.indexTokenMap;
|
|
|
|
|
import static cn.jlw.token.TokenService.updateByIds;
|
|
|
|
|
import static com.ibeetl.admin.core.enums.MenuEnums.*;
|
|
|
|
|
import static com.ibeetl.admin.core.service.CorePlatformService.tokenSessionMap;
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
@ -87,6 +89,7 @@ public class IndexController {
|
|
|
|
|
private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private WebPlatformService webPlatformService;
|
|
|
|
|
private UniversitiesCollegesDao universitiesCollegesDao;
|
|
|
|
|
|
|
|
|
|
private final Log log = LogFactory.getLog(this.getClass());
|
|
|
|
|
|
|
|
|
@ -700,7 +703,7 @@ public class IndexController {
|
|
|
|
|
}
|
|
|
|
|
info.setCurrentOrg(currentOrg);
|
|
|
|
|
|
|
|
|
|
if(null != user && !"JT_S_01".equals(user.getJobType1()) ){//非管理员
|
|
|
|
|
if(null != user && !Arrays.asList(JT_S_01.name(), JT_S_04.name()).contains(user.getJobType1())){//非管理员(包含学校管理员、超管)
|
|
|
|
|
// if(null != type && null != typeId){
|
|
|
|
|
UniversitiesColleges universitiesColleges = universitiesCollegesService.getByOrgId(user.getOrgId());
|
|
|
|
|
if(null != universitiesColleges && ((Integer)1).equals(universitiesColleges.getUniversitiesCollegesStatus())){
|
|
|
|
@ -723,7 +726,7 @@ public class IndexController {
|
|
|
|
|
jsonResult.setCode(JsonReturnCode.SUCCESS.getCode());
|
|
|
|
|
jsonResult.setMsg(msg);
|
|
|
|
|
|
|
|
|
|
if("JT_S_02".equals(user.getJobType1())){//老师
|
|
|
|
|
if(JT_S_02.equals(user.getJobType1())){//老师
|
|
|
|
|
Teacher teacher = teacherService.getByUserId(user.getId());
|
|
|
|
|
String token = tokenService.getToken(teacher);
|
|
|
|
|
|
|
|
|
@ -748,7 +751,7 @@ public class IndexController {
|
|
|
|
|
return jsonResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if("JT_S_03".equals(user.getJobType1())){//学生
|
|
|
|
|
}else if(JT_S_03.equals(user.getJobType1())){//学生
|
|
|
|
|
|
|
|
|
|
Student s = studentService.getByUserId(user.getId());
|
|
|
|
|
String token = tokenService.getToken(s);
|
|
|
|
@ -773,6 +776,7 @@ public class IndexController {
|
|
|
|
|
// 登录信息存放Session
|
|
|
|
|
webPlatformService.setUserInfoToSessionByIdentity(info.getUser());
|
|
|
|
|
platformService.setLoginUser(info.getUser(), info.getCurrentOrg(), info.getOrgs(), uSystem);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return jsonResult;
|
|
|
|
|