2026-01-09 20:13:01 +08:00
|
|
|
|
package com.ruoyi.cms.cron;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.cms.mapper.JobMapper;
|
|
|
|
|
|
import com.ruoyi.cms.service.IBussinessOperLogService;
|
|
|
|
|
|
import com.ruoyi.cms.service.ICompanyService;
|
|
|
|
|
|
import com.ruoyi.cms.service.IESJobSearchService;
|
|
|
|
|
|
import com.ruoyi.cms.service.IJobService;
|
2026-07-16 10:02:56 +08:00
|
|
|
|
import com.ruoyi.cms.service.IJobTitleSuggestService;
|
2026-01-09 20:13:01 +08:00
|
|
|
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class JobCron {
|
|
|
|
|
|
public void isHot(){
|
|
|
|
|
|
SpringUtils.getBean(JobMapper.class).isHot();
|
|
|
|
|
|
}
|
|
|
|
|
|
public void resetEs(){
|
|
|
|
|
|
SpringUtils.getBean(IESJobSearchService.class).resetTextCache();
|
|
|
|
|
|
}
|
|
|
|
|
|
//查看索引是否存在,如果不存在,就更新
|
|
|
|
|
|
public void checkEsAndFix(){
|
|
|
|
|
|
SpringUtils.getBean(IESJobSearchService.class).checkEsAndFix();
|
|
|
|
|
|
}
|
|
|
|
|
|
//更新公司的招聘数量
|
|
|
|
|
|
public void updateJobCountOfCompany(){
|
|
|
|
|
|
SpringUtils.getBean(ICompanyService.class).updateJobCountOfCompany();
|
|
|
|
|
|
}
|
2026-07-16 10:02:56 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 重建岗位名称联想缓存。
|
|
|
|
|
|
* Quartz 任务调用目标:jobCron.rebuildJobTitleSuggest()
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void rebuildJobTitleSuggest(){
|
|
|
|
|
|
SpringUtils.getBean(IJobTitleSuggestService.class).rebuildCache();
|
|
|
|
|
|
}
|
2026-01-09 20:13:01 +08:00
|
|
|
|
}
|