style: 去掉引用语法, 明细改普通行(企微连续引用行渲染粘连)

This commit is contained in:
yeuimu
2026-09-07 10:32:17 +00:00
parent 669f1a717f
commit 34675f16a8
3 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -6,7 +6,7 @@
2. OCR:今天处理了多少订单、识别失败多少(按 ocrProcessedAt 盖章统计)。
3. 失败任务:近 24h 哪些 workflow、哪些 run、失败几次、何时失败(事件报警的兜底汇总)。
消息排版遵循 WeCom aibot markdown 子集(无表格、无 font 标签,引用块 + emoji)。
排版:标题 + 单行结论 + 普通明细行,状态用 <font color> 三色文字表达,不用 emoji/引用/表格。
"""
from __future__ import annotations
@@ -50,7 +50,7 @@ def _system_lines(name: str, report: dict, goods: dict, lines: list[str]) -> boo
diff_days = [d for d in days_r if not d.get("ok")]
diff_units = sum(_affected_units(d.get("diff")) for d in diff_days)
if diff_units:
lines.append(f"> 状态不符约 {diff_units:,} 单({len(diff_days)} 天),已自动刷新修复")
lines.append(f"状态不符约 {diff_units:,} 单({len(diff_days)} 天),已自动刷新修复")
return (not ok) or bool(zero)
@@ -81,9 +81,9 @@ def build_daily_message(
lines.append(f'**任务** 失败 <font color="warning">{len(failures)} 次</font>(24h)')
for f in failures[:6]:
start = (f.get("start") or "")[5:] # MM-DD HH:MM
lines.append(f"> {f.get('flow', '?')}:{f.get('name', '?')} {f.get('state', '?')} {start}")
lines.append(f"{f.get('flow', '?')}:{f.get('name', '?')} {f.get('state', '?')} {start}")
if len(failures) > 6:
lines.append(f"> …等共 {len(failures)} 次")
lines.append(f"…等共 {len(failures)} 次")
else:
lines.append("**任务** 失败 0 次(24h)")