添加pc互联网端,区县工作,公交周边,商圈附近3个接口
This commit is contained in:
@@ -34,6 +34,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||
import org.quickssl.api.CryptoClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -650,4 +651,56 @@ public class CmsJobController extends BaseController
|
||||
}
|
||||
return toAjax(jobService.deleteJobByJobIds(jobIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 附件工作
|
||||
*/
|
||||
@ApiOperation("区县工作")
|
||||
@PostMapping(value = "/countyJob")
|
||||
public TableDataInfo countyJob(@RequestBody ESJobSearch job)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.sysCountyJobList(job);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
/**
|
||||
* 地铁周边
|
||||
*/
|
||||
@ApiOperation("地铁周边")
|
||||
@PostMapping(value = "/subway")
|
||||
public TableDataInfo subway(@RequestBody ESJobSearch jobQuery)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.sysSubway(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商圈周边
|
||||
*/
|
||||
@ApiOperation("商圈周边")
|
||||
@PostMapping(value = "/commercialArea")
|
||||
public TableDataInfo commercialArea(@RequestBody ESJobSearch jobQuery)
|
||||
{
|
||||
EsPageInfo<ESJobDocument> list = jobService.sysCommercialArea(jobQuery);
|
||||
List<ESJobDocument> jobList = list.getList();
|
||||
list.setList(jobList);
|
||||
return getTableDataInfo(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* @param result
|
||||
* @return
|
||||
*/
|
||||
private TableDataInfo getTableDataInfo(EsPageInfo<ESJobDocument> result){
|
||||
long total = result.getTotal();
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(200);
|
||||
rspData.setRows(result.getList());
|
||||
rspData.setTotal(total > 200 ? 200 : total);
|
||||
return rspData;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user