|
|
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.common.core.content.VistorContextHolder;
|
|
|
import com.ruoyi.system.service.ISysDictTypeService;
|
|
|
import com.ruoyi.syzy.domain.*;
|
|
|
import com.ruoyi.syzy.dto.UniversitiesCondDTO;
|
|
|
@@ -59,7 +60,7 @@ public class FrontUniversitiesController extends BaseController {
|
|
|
@GetMapping("filters")
|
|
|
@ApiOperation("00 院校列表数据筛选项")
|
|
|
public AjaxResult filters() {
|
|
|
- String entranceType = ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title());
|
|
|
+ String entranceType = ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title());
|
|
|
JSONObject data = new JSONObject(true);
|
|
|
data.put("locations", universitiesService.getLocations(entranceType));
|
|
|
data.put("natureTypes", universitiesService.getNatureTypeCN(entranceType));//办学性质:公办民办
|
|
|
@@ -79,31 +80,31 @@ public class FrontUniversitiesController extends BaseController {
|
|
|
@GetMapping("locations")
|
|
|
@ApiOperation("00 院校列表数据筛选项-地域 回传location")
|
|
|
public AjaxResult locations() {
|
|
|
- return AjaxResult.success(universitiesService.getLocations(ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title())));
|
|
|
+ return AjaxResult.success(universitiesService.getLocations(ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title())));
|
|
|
}
|
|
|
|
|
|
@GetMapping("natureTypes")
|
|
|
@ApiOperation("00 院校列表数据筛选项-主管部门类型 回传natureTypeCN")
|
|
|
public AjaxResult natureTypes() {
|
|
|
- return AjaxResult.success(universitiesService.getNatureTypeCN(ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title())));
|
|
|
+ return AjaxResult.success(universitiesService.getNatureTypeCN(ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title())));
|
|
|
}
|
|
|
|
|
|
@GetMapping("types")
|
|
|
@ApiOperation("00 院校列表数据筛选项-院校类型 回传type")
|
|
|
public AjaxResult types() {
|
|
|
- return AjaxResult.success(universitiesService.getTypes(ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title())));
|
|
|
+ return AjaxResult.success(universitiesService.getTypes(ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title())));
|
|
|
}
|
|
|
|
|
|
@GetMapping("levels")
|
|
|
@ApiOperation("00 院校列表数据筛选项-学历层次 回传level")
|
|
|
public AjaxResult levels() {
|
|
|
- return AjaxResult.success(universitiesService.getLevels(ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title())));
|
|
|
+ return AjaxResult.success(universitiesService.getLevels(ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title())));
|
|
|
}
|
|
|
|
|
|
@GetMapping("features")
|
|
|
@ApiOperation("00 院校列表数据筛选项-院校类型 回传features")
|
|
|
public AjaxResult features() {
|
|
|
- return AjaxResult.success(universitiesService.getFeatures(ConstantUtil.getExamTypeData(SecurityUtils.getLoginUser().getUser().getExamType().title())));
|
|
|
+ return AjaxResult.success(universitiesService.getFeatures(ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title())));
|
|
|
}
|
|
|
|
|
|
@GetMapping("listNoToken")
|
|
|
@@ -117,7 +118,7 @@ public class FrontUniversitiesController extends BaseController {
|
|
|
@ApiOperation("01 院校列表")
|
|
|
public TableDataInfo list(UniversitiesCondDTO cond, @ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
|
|
|
@ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
|
|
|
- String location = SecurityUtils.getLoginUser().getUser().getLocation();
|
|
|
+ String location = VistorContextHolder.getLocation();
|
|
|
if(StringUtils.isNotBlank(location)){
|
|
|
location = location+",全国";
|
|
|
}
|