1
This commit is contained in:
@@ -91,7 +91,15 @@ class DeliverHandler extends BaseHandler {
|
||||
|
||||
// 6. 下发 get_job_list 拉取职位列表(tabLabel 切换期望 tab,job_type_id 随指令下发供设备使用)
|
||||
const tabLabel = resume.deliver_tab_label || '';
|
||||
await this.getJobList(sn_code, platform, pageCount, task.id, tabLabel, accountConfig.job_type_id);
|
||||
await this.getJobList(
|
||||
sn_code,
|
||||
platform,
|
||||
pageCount,
|
||||
task.id,
|
||||
tabLabel,
|
||||
accountConfig.job_type_id,
|
||||
accountConfig.keyword
|
||||
);
|
||||
|
||||
// 7. 从数据库获取待投递职位
|
||||
const pendingJobs = await this.getPendingJobs(sn_code, platform, actualMaxCount * 3);
|
||||
@@ -277,14 +285,20 @@ class DeliverHandler extends BaseHandler {
|
||||
* @param {string} tabLabel - 投递用期望标签文案,对应 resume_info.deliver_tab_label,get_job_list 会按此选择 tab
|
||||
* @param {number} jobTypeId - 职位类型 ID,随指令下发供设备使用
|
||||
*/
|
||||
async getJobList(sn_code, platform, pageCount, taskId, tabLabel = '', jobTypeId = null) {
|
||||
async getJobList(sn_code, platform, pageCount, taskId, tabLabel = '', jobTypeId = null, accountKeyword = '') {
|
||||
const label = tabLabel != null && String(tabLabel).trim() !== '' ? String(tabLabel).trim() : '';
|
||||
const accKw = accountKeyword != null && String(accountKeyword).trim() !== '' ? String(accountKeyword).trim() : '';
|
||||
// 与 jobManager 一致:优先期望职位文案,其次账户搜索词,用于 job_postings.keyword
|
||||
const keyword = label || accKw;
|
||||
|
||||
const params = {
|
||||
sn_code,
|
||||
platform,
|
||||
pageCount
|
||||
pageCount,
|
||||
keyword
|
||||
};
|
||||
if (tabLabel != null && String(tabLabel).trim() !== '') {
|
||||
params.tabLabel = String(tabLabel).trim();
|
||||
if (label) {
|
||||
params.tabLabel = label;
|
||||
}
|
||||
if (jobTypeId != null && jobTypeId !== '') {
|
||||
params.job_type_id = jobTypeId;
|
||||
|
||||
@@ -77,9 +77,14 @@ class SearchHandler extends BaseHandler {
|
||||
console.warn('[自动搜索] 读取 resume_info.deliver_tab_label 失败:', e.message);
|
||||
}
|
||||
|
||||
let listKeyword = (keyword && String(keyword).trim()) || (accountConfig.keyword && String(accountConfig.keyword).trim()) || '';
|
||||
if (!listKeyword && tabLabel) {
|
||||
listKeyword = tabLabel;
|
||||
}
|
||||
|
||||
const commandParams = {
|
||||
sn_code,
|
||||
keyword: keyword || accountConfig.keyword || '',
|
||||
keyword: listKeyword,
|
||||
platform: platformType,
|
||||
pageCount: pageCount || searchConfig.page_count || 3
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user