落地海运私聊文字询价全流程,海运多项费用改走文本明细,避免企微卡片引用条截断。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-15 14:26:09 +08:00
co-authored by Cursor
parent 58b3c2f3e6
commit 0a3c74e3a1
41 changed files with 3702 additions and 48 deletions
+9 -1
View File
@@ -41,10 +41,18 @@ def normalize_biz(raw: str) -> str:
def _as_keywords(raw: Any) -> list[str]:
"""摊开关键词。列表里若整段是 [海运,整柜] 也要拆开,与 Java asKeywords 一致。"""
if raw is None:
return []
if isinstance(raw, (list, tuple)):
return [str(x).strip() for x in raw if str(x).strip()]
out: list[str] = []
for x in raw:
s = str(x).strip()
if s.startswith("["):
out.extend(_as_keywords(s))
elif s:
out.append(s)
return out
text = str(raw).strip()
if not text or text.lower() == "null":
return []