jinxia.mo před 3 týdny
rodič
revize
9216ab5f14

+ 4 - 4
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontSyMajorRelationController.java

@@ -220,15 +220,15 @@ public class FrontSyMajorRelationController extends BaseController {
         }
         String examType = null==user?(null==VistorContextHolder.getExamType()?"单招(应届普高)":VistorContextHolder.getExamType().name()):(null==user.getExamType()?"单招(应届普高)":user.getExamType().title());
 //        query.setExamType(ConstantUtil.getExamTypeData(user.getExamType().title()));
-        query.setExamType(ConstantUtil.getExamTypeData(examType));
+
+//        query.setExamType(ConstantUtil.getExamTypeData(examType));
         List<SyMajor> majorList = syMajorService.selectSyMajorList(query);
         List<SyVocational> toList = new ArrayList<>();
 
-        LoginUser loginUser = SecurityUtils.getLoginUser();
         List<String>  majorListByPlan = new ArrayList<>();
         //湖南:计划中有的专业加入
-        if (null != loginUser){
-            String location = loginUser.getUser().getLocation();
+        if (null != VistorContextHolder.getLocation()){
+            String location = VistorContextHolder.getLocation();
             if ("湖南".equals(location)){
                 majorListByPlan = syMajorService.selectMajorsByPlan(location).stream().map(major->major.getName()).collect(Collectors.toList());
             }