|
@@ -14,6 +14,7 @@ import com.ruoyi.syzy.domain.BWwwNews;
|
|
|
import com.ruoyi.syzy.domain.BWwwNewsRef;
|
|
import com.ruoyi.syzy.domain.BWwwNewsRef;
|
|
|
import com.ruoyi.syzy.service.IBWwwNewsRefService;
|
|
import com.ruoyi.syzy.service.IBWwwNewsRefService;
|
|
|
import com.ruoyi.syzy.service.IBWwwNewsService;
|
|
import com.ruoyi.syzy.service.IBWwwNewsService;
|
|
|
|
|
+import com.ruoyi.web.service.CommService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
@@ -43,6 +44,8 @@ public class FrontNewsController extends BaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService sysConfigService;
|
|
private ISysConfigService sysConfigService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private CommService commService;
|
|
|
@GetMapping("types")
|
|
@GetMapping("types")
|
|
|
@ApiOperation("00 高考资讯类型")
|
|
@ApiOperation("00 高考资讯类型")
|
|
|
public TableDataInfo types() {
|
|
public TableDataInfo types() {
|
|
@@ -72,7 +75,7 @@ public class FrontNewsController extends BaseController {
|
|
|
@ApiOperation("00 通关指南")
|
|
@ApiOperation("00 通关指南")
|
|
|
public TableDataInfo getMainList(@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location) {
|
|
public TableDataInfo getMainList(@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location) {
|
|
|
BWwwNewsRef cond = new BWwwNewsRef();
|
|
BWwwNewsRef cond = new BWwwNewsRef();
|
|
|
- cond.setLocation(getLocation(location));
|
|
|
|
|
|
|
+ cond.setLocation(commService.getLocation(location));
|
|
|
return getDataTable(newsRefService.selectBWwwNewsRefList(cond));
|
|
return getDataTable(newsRefService.selectBWwwNewsRefList(cond));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -80,7 +83,7 @@ public class FrontNewsController extends BaseController {
|
|
|
@ApiOperation("00 通关指南免登陆")
|
|
@ApiOperation("00 通关指南免登陆")
|
|
|
public TableDataInfo getMainListNoToken(@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location) {
|
|
public TableDataInfo getMainListNoToken(@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location) {
|
|
|
BWwwNewsRef cond = new BWwwNewsRef();
|
|
BWwwNewsRef cond = new BWwwNewsRef();
|
|
|
- cond.setLocation(getLocation(location));
|
|
|
|
|
|
|
+ cond.setLocation(commService.getLocation(location));
|
|
|
return getDataTable(newsRefService.selectBWwwNewsRefList(cond));
|
|
return getDataTable(newsRefService.selectBWwwNewsRefList(cond));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -107,7 +110,7 @@ public class FrontNewsController extends BaseController {
|
|
|
@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location,
|
|
@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location,
|
|
|
@ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
|
|
@ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
|
|
|
@ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
|
|
@ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
|
|
|
- return llist(ids,top,type,tag,title,getLocation(location), pageNum,pageSize);
|
|
|
|
|
|
|
+ return llist(ids,top,type,tag,title,commService.getLocation(location), pageNum,pageSize);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private TableDataInfo llist(String ids,Boolean top,String type, String tag,String title,String location, Integer pageNum,Integer pageSize){
|
|
private TableDataInfo llist(String ids,Boolean top,String type, String tag,String title,String location, Integer pageNum,Integer pageSize){
|
|
@@ -116,7 +119,7 @@ public class FrontNewsController extends BaseController {
|
|
|
exam.setType(type);
|
|
exam.setType(type);
|
|
|
exam.setTitle(title);
|
|
exam.setTitle(title);
|
|
|
exam.setTag(StringUtils.trimToNull(tag));
|
|
exam.setTag(StringUtils.trimToNull(tag));
|
|
|
- exam.setLocation(getLocation(location));
|
|
|
|
|
|
|
+ exam.setLocation(commService.getLocation(location));
|
|
|
if(StringUtils.isNotBlank(ids)){
|
|
if(StringUtils.isNotBlank(ids)){
|
|
|
String[] strArray = ids.split(",");
|
|
String[] strArray = ids.split(",");
|
|
|
List<String> strList = new ArrayList<>(strArray.length);
|
|
List<String> strList = new ArrayList<>(strArray.length);
|
|
@@ -135,7 +138,7 @@ public class FrontNewsController extends BaseController {
|
|
|
@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location,
|
|
@ApiParam(value = "省份 ", example = "湖南") @RequestParam(required = false) String location,
|
|
|
@ApiParam(value = "页数", example = "1") Integer pageNum,
|
|
@ApiParam(value = "页数", example = "1") Integer pageNum,
|
|
|
@ApiParam(value = "页大小", example = "15") Integer pageSize) {
|
|
@ApiParam(value = "页大小", example = "15") Integer pageSize) {
|
|
|
- return llist(ids,top,type,tag,title,getLocation(location), pageNum,pageSize);
|
|
|
|
|
|
|
+ return llist(ids,top,type,tag,title,commService.getLocation(location), pageNum,pageSize);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("info")
|
|
@GetMapping("info")
|
|
@@ -157,14 +160,6 @@ public class FrontNewsController extends BaseController {
|
|
|
return AjaxResult.success(clicked);
|
|
return AjaxResult.success(clicked);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private String getLocation(String location){
|
|
|
|
|
- if(StringUtils.isBlank(location)) {
|
|
|
|
|
- location = VistorContextHolder.getLocation();
|
|
|
|
|
- }
|
|
|
|
|
- if (StringUtils.isBlank(location)) {
|
|
|
|
|
- location = "湖南";
|
|
|
|
|
- }
|
|
|
|
|
- return location;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|