是否考虑猎头功能暂时隐藏

This commit is contained in:
2026-08-29 13:50:31 +08:00
parent 602a137c93
commit 692b166d9f
13 changed files with 689 additions and 36 deletions
+4
View File
@@ -237,6 +237,7 @@ class ResumeUpdateReq(BaseModel):
class StartActivateReq(BaseModel):
match_text: str # 匹配条件文本(最后一条消息与之比对)
status_filter: str = "unread" # 消息状态过滤:unread=仅未读 / read=仅已读 / all=不限
threshold: int = 80 # 相似度阈值(0-100)
reply_message: str # 命中后发送的自定义消息
max_count: int = 20 # 单次任务发送上限(0=不限)
@@ -514,6 +515,8 @@ def stop_apply():
def start_activate(req: StartActivateReq):
if not req.match_text.strip():
raise HTTPException(status_code=400, detail="请填写匹配条件文本")
if req.status_filter not in ("unread", "read", "all"):
raise HTTPException(status_code=400, detail="消息状态过滤取值非法")
if not req.reply_message.strip():
raise HTTPException(status_code=400, detail="请填写激活消息内容")
if state.applicant and state.applicant.is_running:
@@ -528,6 +531,7 @@ def start_activate(req: StartActivateReq):
raise HTTPException(status_code=400, detail=str(e))
activator.start(
match_text=req.match_text,
status_filter=req.status_filter,
threshold=req.threshold / 100.0,
reply_message=req.reply_message,
max_count=req.max_count,