修复附件询价:公网打开上传页不再出骨架 JSON,未上传时打字能正常回话。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -287,6 +287,24 @@ class AttachWaveBook:
|
||||
parts.append(wave.follow_text.strip())
|
||||
return "\n".join(parts)
|
||||
|
||||
def abandon_if_idle(self, sender_id: str) -> bool:
|
||||
"""
|
||||
还没开始认材料:作废等待票。已开始认或无票返回 False。
|
||||
|
||||
销售发卡后改口打字询价时用。旧 H5 随后按过期拒绝。
|
||||
"""
|
||||
sid = (sender_id or "").strip()
|
||||
if not sid:
|
||||
return False
|
||||
with self._lock:
|
||||
self._hydrate(sid)
|
||||
wave = self._waves.get(sid)
|
||||
if wave is None or wave.business_done or wave.started:
|
||||
return False
|
||||
wave.business_done = True
|
||||
self._persist(sid)
|
||||
return True
|
||||
|
||||
def mark_business_done(self, sender_id: str) -> None:
|
||||
"""业务补问/卡片已发出。之后旧 H5 与并入图都必须拒绝。"""
|
||||
sid = (sender_id or "").strip()
|
||||
|
||||
Reference in New Issue
Block a user