当前季度和当月招聘会详情
This commit is contained in:
@@ -97,4 +97,30 @@ public class AppFairController extends BaseController
|
||||
{
|
||||
return toAjax(jobFairSignUpService.cancelSignUp(fairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看当季度招聘会信息
|
||||
*/
|
||||
@BussinessLog(title = "查看当季度招聘会信息")
|
||||
@ApiOperation("查看当季度招聘会信息")
|
||||
@GetMapping("/currentQuarter")
|
||||
public TableDataInfo currentQuarterFairs(JobFair jobFair)
|
||||
{
|
||||
startPage();
|
||||
List<JobFair> results = jobFairService.getCurrentQuarterFairs(jobFair);
|
||||
return getDataTable(results);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看当月招聘会信息
|
||||
*/
|
||||
@BussinessLog(title = "查看当月招聘会信息")
|
||||
@ApiOperation("查看当月招聘会信息")
|
||||
@GetMapping("/currentMonth")
|
||||
public TableDataInfo currentMonthFairs(JobFair jobFair)
|
||||
{
|
||||
startPage();
|
||||
List<JobFair> results = jobFairService.getCurrentMonthFairs(jobFair);
|
||||
return getDataTable(results);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,4 +60,34 @@ public class PublicJobFairController extends BaseController {
|
||||
List<PublicJobFairCompanyVO> list = publicJobFairService.getEnterprisesWithJobs(jobFairId);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看当季度招聘会信息
|
||||
*/
|
||||
@BussinessLog(title = "查看当季度招聘会信息")
|
||||
@ApiOperation("查看当季度招聘会信息")
|
||||
@GetMapping("/currentQuarter")
|
||||
public AjaxResult currentQuarterFairs() {
|
||||
return success(publicJobFairService.getCurrentQuarterFairs());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看当月招聘会信息
|
||||
*/
|
||||
@BussinessLog(title = "查看当月招聘会信息")
|
||||
@ApiOperation("查看当月招聘会信息")
|
||||
@GetMapping("/currentMonth")
|
||||
public AjaxResult currentMonthFairs() {
|
||||
return success(publicJobFairService.getCurrentMonthFairs());
|
||||
}
|
||||
|
||||
/**
|
||||
* 按年份查询每日招聘会数量
|
||||
*/
|
||||
@BussinessLog(title = "按年份查询每日招聘会数量")
|
||||
@ApiOperation("按年份查询每日招聘会数量")
|
||||
@GetMapping("/dailyCount/{year}")
|
||||
public AjaxResult dailyCountByYear(@ApiParam("年份") @PathVariable Integer year) {
|
||||
return success(publicJobFairService.getDailyCountByYear(year));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.cms.domain.rc;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 每日招聘会数量VO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("每日招聘会数量")
|
||||
public class JobFairDailyCountVO {
|
||||
|
||||
@ApiModelProperty("日期 (yyyy-MM-dd)")
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty("招聘会数量")
|
||||
private Integer count;
|
||||
}
|
||||
@@ -23,4 +23,20 @@ public interface JobFairMapper extends BaseMapper<JobFair>
|
||||
List<JobFair> appList(JobFair jobFair);
|
||||
|
||||
List<JobFair> selectAppList(@Param("userId")Long userId, @Param("type")Integer type);
|
||||
|
||||
/**
|
||||
* 查询当季度招聘会信息列表
|
||||
*
|
||||
* @param jobFair 招聘会信息
|
||||
* @return 招聘会信息集合
|
||||
*/
|
||||
List<JobFair> getCurrentQuarterFairs(JobFair jobFair);
|
||||
|
||||
/**
|
||||
* 查询当月招聘会信息列表
|
||||
*
|
||||
* @param jobFair 招聘会信息
|
||||
* @return 招聘会信息集合
|
||||
*/
|
||||
List<JobFair> getCurrentMonthFairs(JobFair jobFair);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,21 @@ public interface PublicJobFairMapper extends BaseMapper<PublicJobFair> {
|
||||
*/
|
||||
Integer checkUserSignUp(@Param("jobFairId") String jobFairId, @Param("personId") Long personId);
|
||||
|
||||
/**
|
||||
* 查询当季度招聘会信息列表
|
||||
*/
|
||||
List<PublicJobFair> getCurrentQuarterFairs();
|
||||
|
||||
/**
|
||||
* 查询当月招聘会信息列表
|
||||
*/
|
||||
List<PublicJobFair> getCurrentMonthFairs();
|
||||
|
||||
/**
|
||||
* 按年份查询每日招聘会数量
|
||||
*/
|
||||
List<JobFairDailyCountVO> getDailyCountByYear(@Param("year") Integer year);
|
||||
|
||||
// ========== CMS后台管理接口 ==========
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,4 +53,20 @@ public interface IJobFairService
|
||||
List<JobFair> appList(JobFair jobFair);
|
||||
|
||||
JobFair appDetail(Long fairId);
|
||||
|
||||
/**
|
||||
* 查询当季度招聘会信息列表
|
||||
*
|
||||
* @param jobFair 招聘会信息
|
||||
* @return 招聘会信息集合
|
||||
*/
|
||||
List<JobFair> getCurrentQuarterFairs(JobFair jobFair);
|
||||
|
||||
/**
|
||||
* 查询当月招聘会信息列表
|
||||
*
|
||||
* @param jobFair 招聘会信息
|
||||
* @return 招聘会信息集合
|
||||
*/
|
||||
List<JobFair> getCurrentMonthFairs(JobFair jobFair);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
/**
|
||||
* 项目启动时,初始化索引及数据
|
||||
*/
|
||||
@PostConstruct
|
||||
// @PostConstruct
|
||||
public void init()
|
||||
{
|
||||
boolean isLockAcquired = false;
|
||||
|
||||
@@ -174,4 +174,42 @@ public class JobFairServiceImpl extends ServiceImpl<JobFairMapper,JobFair> imple
|
||||
}
|
||||
return fairCompanies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JobFair> getCurrentQuarterFairs(JobFair jobFair) {
|
||||
List<JobFair> fairCompanies = jobFairMapper.getCurrentQuarterFairs(jobFair);
|
||||
if(fairCompanies.isEmpty()){return new ArrayList<>();}
|
||||
if(SiteSecurityUtils.isLogin()){
|
||||
//收藏
|
||||
Set<Long> collectionIds = fairCollectionMapper.selectList(Wrappers.<FairCollection>lambdaQuery()
|
||||
.eq(FairCollection::getUserId, SiteSecurityUtils.getUserId())
|
||||
.in(FairCollection::getFairId, fairCompanies.stream().map(JobFair::getJobFairId).collect(Collectors.toList())))
|
||||
.stream().map(FairCollection::getFairId).collect(Collectors.toSet());
|
||||
for (JobFair j : fairCompanies) {
|
||||
if (collectionIds.contains(j.getJobFairId())) {
|
||||
j.setIsCollection(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fairCompanies;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JobFair> getCurrentMonthFairs(JobFair jobFair) {
|
||||
List<JobFair> fairCompanies = jobFairMapper.getCurrentMonthFairs(jobFair);
|
||||
if(fairCompanies.isEmpty()){return new ArrayList<>();}
|
||||
if(SiteSecurityUtils.isLogin()){
|
||||
//收藏
|
||||
Set<Long> collectionIds = fairCollectionMapper.selectList(Wrappers.<FairCollection>lambdaQuery()
|
||||
.eq(FairCollection::getUserId, SiteSecurityUtils.getUserId())
|
||||
.in(FairCollection::getFairId, fairCompanies.stream().map(JobFair::getJobFairId).collect(Collectors.toList())))
|
||||
.stream().map(FairCollection::getFairId).collect(Collectors.toSet());
|
||||
for (JobFair j : fairCompanies) {
|
||||
if (collectionIds.contains(j.getJobFairId())) {
|
||||
j.setIsCollection(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fairCompanies;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,21 @@ public interface IPublicJobFairService {
|
||||
*/
|
||||
List<PublicJobFairCompanyVO> getEnterprisesWithJobs(String jobFairId);
|
||||
|
||||
/**
|
||||
* 查询当季度招聘会信息列表
|
||||
*/
|
||||
List<PublicJobFair> getCurrentQuarterFairs();
|
||||
|
||||
/**
|
||||
* 查询当月招聘会信息列表
|
||||
*/
|
||||
List<PublicJobFair> getCurrentMonthFairs();
|
||||
|
||||
/**
|
||||
* 按年份查询每日招聘会数量
|
||||
*/
|
||||
List<JobFairDailyCountVO> getDailyCountByYear(Integer year);
|
||||
|
||||
// ========== CMS后台管理接口 ==========
|
||||
|
||||
/**
|
||||
|
||||
@@ -103,6 +103,21 @@ public class PublicJobFairServiceImpl implements IPublicJobFairService {
|
||||
return companyList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PublicJobFair> getCurrentQuarterFairs() {
|
||||
return publicJobFairMapper.getCurrentQuarterFairs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PublicJobFair> getCurrentMonthFairs() {
|
||||
return publicJobFairMapper.getCurrentMonthFairs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JobFairDailyCountVO> getDailyCountByYear(Integer year) {
|
||||
return publicJobFairMapper.getDailyCountByYear(year);
|
||||
}
|
||||
|
||||
// ========== CMS后台管理接口实现 ==========
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user