1
This commit is contained in:
@@ -496,7 +496,7 @@ module.exports = {
|
||||
|
||||
/**
|
||||
* 仅保存投递标签:标签列表(来自 get_job_listings)+ 当前选中的标签
|
||||
* 只更新 resume_info 的 job_listings、deliver_tab_label,不碰其他配置
|
||||
* 更新 resume_info 的 job_listings、deliver_tab_label,并同步 pla_account.keyword(与推荐/期望职位一致)
|
||||
*/
|
||||
'POST /user/deliver-tab-label/save': async (ctx) => {
|
||||
try {
|
||||
@@ -533,6 +533,10 @@ module.exports = {
|
||||
isActive: true
|
||||
});
|
||||
}
|
||||
|
||||
const keywordSync = label.trim().slice(0, 50);
|
||||
await pla_account.update({ keyword: keywordSync }, { where: { id: user.id } });
|
||||
|
||||
return ctx.success({ message: '投递标签已保存', job_listings: list, deliver_tab_label: label });
|
||||
} catch (error) {
|
||||
console.error('[保存投递标签失败]', error);
|
||||
@@ -603,6 +607,13 @@ module.exports = {
|
||||
isActive: true
|
||||
});
|
||||
}
|
||||
|
||||
if (deliver_tab_label !== undefined) {
|
||||
const keywordSync = (deliver_tab_label != null ? String(deliver_tab_label) : '')
|
||||
.trim()
|
||||
.slice(0, 50);
|
||||
await pla_account.update({ keyword: keywordSync }, { where: { id: user.id } });
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(updateData).length === 0 && deliver_tab_label === undefined && job_listings === undefined) {
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = (db) => {
|
||||
defaultValue: ''
|
||||
},
|
||||
keyword: {
|
||||
comment: '关键词',
|
||||
comment: '搜索/推荐职位关键词;保存投递期望标签时会与 resume_info.deliver_tab_label 同步',
|
||||
type: Sequelize.STRING(50),
|
||||
allowNull: false,
|
||||
defaultValue: ''
|
||||
|
||||
Reference in New Issue
Block a user