落地私聊空运询价与TMS报价回填,按后台模板出单。
查到价后把币种、单位、数量、单价、备注写入报价单,避免销售只看到光秃秃的金额。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -59,6 +59,7 @@ class OutboxItem:
|
||||
last_error: str = ""
|
||||
created_at: float = field(default_factory=time.time)
|
||||
dedupe_key: str = ""
|
||||
payload: dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
class MemoryMessageStore:
|
||||
@@ -140,8 +141,9 @@ class MemoryMessageStore:
|
||||
touser: str,
|
||||
content: str,
|
||||
dedupe_key: str = "",
|
||||
payload: Optional[dict[str, Any]] = None,
|
||||
) -> tuple[bool, str]:
|
||||
"""写入 outbox;dedupe_key 重复则跳过。"""
|
||||
"""写入 outbox;dedupe_key 重复则跳过。payload 可带企微模板卡。"""
|
||||
if not touser or not content:
|
||||
return False, "invalid_outbox"
|
||||
with self._lock:
|
||||
@@ -154,6 +156,7 @@ class MemoryMessageStore:
|
||||
touser=touser,
|
||||
content=content,
|
||||
dedupe_key=dedupe_key,
|
||||
payload=dict(payload or {}),
|
||||
)
|
||||
self._outbox[item.id] = item
|
||||
self._outbox_event.set()
|
||||
|
||||
Reference in New Issue
Block a user