Commit d059e398 by 谢海旭

202601月中版本 招聘管理:超72小时无简历

1 parent 21050443
......@@ -48,5 +48,9 @@
<artifactId>rpc-scrm-entmicro-api</artifactId>
<version>3.25.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-elasticjob</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentDemandNoResumeReminderJob
* @Description: 招聘需求72小时未投递简历提醒 任务
* @Author system
* @Date 2025/01/01
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentDemandNoResumeReminderJob", cron = "32 * * * * ?", description = "招聘需求72小时未投递简历提醒 任务", overwrite = false)
public class RecruitmentDemandNoResumeReminderJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求72小时未投递简历提醒任务开始");
try {
recruitmentDemandService.checkAndRemindNoResumeIn72Hours();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求72小时未投递简历提醒任务结束");
}
}
......@@ -15,4 +15,10 @@ public interface RecruitmentDemandMapper extends OreMapper<RecruitmentDemand> {
List<RecruitmentDemandDTO> listRecruitmentDemand(RecruitmentDemandDTO dto);
List<RecruitmentDemandPageRecordDTO> recruitmentDemandWebPage(RecruitmentDemandPageRecordDTO dto);
/**
* 查询正好72小时未投递简历的招聘需求
* @return 招聘需求列表
*/
List<RecruitmentDemand> find72HoursNoResumeDemands();
}
\ No newline at end of file
......@@ -891,4 +891,41 @@ public class RecruitmentDemandService {
return dtos;
}
/**
* 检查并提醒72小时未投递简历的招聘需求
* 1、查询符合条件的招聘需求集合
* 2、遍历集合For里推送企微消息(面向招聘负责人-广联赛讯-嘀加企微管家)
*/
public void checkAndRemindNoResumeIn72Hours() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find72HoursNoResumeDemands();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(正好72小时且无简历)");
return;
}
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},招聘负责人:{}", demand.getId(), demand.getRecruiterName());
sendRecruitmentQWTextMessage(
demand.getRecruiterPhone(),
"招聘需求进度提醒",
"您的招聘需求已超过72小时未投递简历,请及时前往saas+增值业务运营平台查看处理。",
demand.getId(),
demand.getRecruiterName()
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送消息异常", demand.getId(), e);
}
}
log.info("检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查招聘需求72小时未投递简历异常", e);
}
}
}
......@@ -150,4 +150,26 @@
</if>
order by status asc, created_date desc
</select>
<select id="find72HoursNoResumeDemands" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_uuid, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.start_time IS NOT NULL
AND TIMESTAMPDIFF(HOUR, d.start_time, NOW()) = 72
AND NOT EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
)
ORDER BY d.id DESC
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!