This commit is contained in:
张成
2026-02-28 13:31:32 +08:00
parent dfd3119163
commit 58c9d64e55
6 changed files with 163 additions and 33 deletions

View File

@@ -59,16 +59,36 @@ class SearchHandler extends BaseHandler {
}
}
// 4. 创建搜索指令
// 4. 从 resume_info 取 deliver_tab_label下发给 get_job_list 用于切换期望 tab
const platformType = platform || accountConfig.platform_type || 'boss';
let tabLabel = '';
try {
const db = require('../../dbProxy');
const resume_info = db.getModel('resume_info');
const resume = await resume_info.findOne({
where: { sn_code, platform: platformType, isActive: true },
order: [['last_modify_time', 'DESC']],
attributes: ['deliver_tab_label']
});
if (resume && resume.deliver_tab_label) {
tabLabel = String(resume.deliver_tab_label).trim();
}
} catch (e) {
console.warn('[自动搜索] 读取 resume_info.deliver_tab_label 失败:', e.message);
}
const commandParams = {
sn_code,
keyword: keyword || accountConfig.keyword || '',
platform: platformType,
pageCount: pageCount || searchConfig.page_count || 3
};
if (tabLabel) commandParams.tabLabel = tabLabel;
const searchCommand = {
command_type: 'get_job_list',
command_name: 'get_job_list',
command_params: JSON.stringify({
sn_code,
keyword: keyword || accountConfig.keyword || '',
platform: platform || accountConfig.platform_type || 'boss',
pageCount: pageCount || searchConfig.page_count || 3
}),
command_params: JSON.stringify(commandParams),
priority: config.getTaskPriority('search_jobs') || 8
};