添加基础过滤查询接口
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
package org.jiayunet.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.jiayunet.service.RecruitAnnouncementService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招聘公告接口
|
||||
* <p>提供公告筛选项(批次/岗位大类/热招城市/学历要求/行业/标签/招聘届数)的去重查询</p>
|
||||
*
|
||||
* @author zk
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/public/recruitAnnouncement")
|
||||
@AllArgsConstructor
|
||||
@Validated
|
||||
public class RecruitAnnouncementController {
|
||||
|
||||
private RecruitAnnouncementService recruitAnnouncementService;
|
||||
|
||||
/** 查询公告批次列表(去重) */
|
||||
@GetMapping("/batch")
|
||||
public List<String> listBatchName() {
|
||||
return recruitAnnouncementService.listBatchName();
|
||||
}
|
||||
|
||||
/** 查询公告岗位大类列表(去重) */
|
||||
@GetMapping("/category")
|
||||
public List<String> listCategoryName() {
|
||||
return recruitAnnouncementService.listCategoryName();
|
||||
}
|
||||
|
||||
/** 查询公告热招城市列表(去重) */
|
||||
@GetMapping("/city")
|
||||
public List<String> listCityName() {
|
||||
return recruitAnnouncementService.listCityName();
|
||||
}
|
||||
|
||||
/** 查询公告学历要求列表(去重) */
|
||||
@GetMapping("/education")
|
||||
public List<String> listEducationName() {
|
||||
return recruitAnnouncementService.listEducationName();
|
||||
}
|
||||
|
||||
/** 查询公告行业列表(去重) */
|
||||
@GetMapping("/industry")
|
||||
public List<String> listIndustryName() {
|
||||
return recruitAnnouncementService.listIndustryName();
|
||||
}
|
||||
|
||||
/** 查询公告标签列表(去重) */
|
||||
@GetMapping("/tag")
|
||||
public List<String> listTagName() {
|
||||
return recruitAnnouncementService.listTagName();
|
||||
}
|
||||
|
||||
/** 查询公告招聘届数列表(去重) */
|
||||
@GetMapping("/year")
|
||||
public List<Integer> listRecruitYear() {
|
||||
return recruitAnnouncementService.listRecruitYear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.jiayunet.service;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementBatchMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementCategoryMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementCityMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementEducationMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementIndustryMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementTagMapper;
|
||||
import org.jiayunet.mapper.RecruitAnnouncementYearMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 招聘公告服务
|
||||
* <p>依赖:无</p>
|
||||
* <p>使用表:bg_recruit_announcement(公告主表)、bg_recruit_announcement_year(招聘届数)、
|
||||
* bg_recruit_announcement_batch(批次)、bg_recruit_announcement_tag(标签组)、
|
||||
* bg_recruit_announcement_city(热招城市)、bg_recruit_announcement_category(岗位大类)、
|
||||
* bg_recruit_announcement_industry(行业)、bg_recruit_announcement_education(学历要求)</p>
|
||||
*
|
||||
* @author zk
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class RecruitAnnouncementService {
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementBatchMapper batchMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementCategoryMapper categoryMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementCityMapper cityMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementEducationMapper educationMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementIndustryMapper industryMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementTagMapper tagMapper;
|
||||
|
||||
@Autowired
|
||||
private RecruitAnnouncementYearMapper yearMapper;
|
||||
|
||||
/**
|
||||
* 查询公告批次列表
|
||||
* <p>按batch_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listBatchName() {
|
||||
return batchMapper.selectBatchNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告岗位大类列表
|
||||
* <p>按category_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listCategoryName() {
|
||||
return categoryMapper.selectCategoryNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告热招城市列表
|
||||
* <p>按city_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listCityName() {
|
||||
return cityMapper.selectCityNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告学历要求列表
|
||||
* <p>按education_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listEducationName() {
|
||||
return educationMapper.selectEducationNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告行业列表
|
||||
* <p>按industry_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listIndustryName() {
|
||||
return industryMapper.selectIndustryNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告标签列表
|
||||
* <p>按tag_name分组去重后返回</p>
|
||||
*/
|
||||
public List<String> listTagName() {
|
||||
return tagMapper.selectTagNameGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告招聘届数列表
|
||||
* <p>按recruit_year分组去重后返回</p>
|
||||
*/
|
||||
public List<Integer> listRecruitYear() {
|
||||
return yearMapper.selectRecruitYearGroup();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user