feat(staff): 员工列表排序对齐云客API返回顺序(list_order列+抓取记序+API按序排)

- wechat_account 加 list_order 列(云客 wxUser/list 返回顺序)
- 抓取器记录每行在API响应中的序号
- /api/accounts ORDER BY list_order(对齐云客员工列表排列)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-24 11:25:33 +08:00
parent 68f535d637
commit 804addf725
3 changed files with 16 additions and 2 deletions
+2
View File
@@ -166,6 +166,8 @@ class WechatAccount(Base):
last_update: Mapped[int | None] = mapped_column(BigInteger, nullable=True)
version: Mapped[str | None] = mapped_column(String(64), nullable=True)
# 云客 wxUser/list 返回顺序(对齐云客员工列表排列;NULL=未回填按 wx_id 排)
list_order: Mapped[int | None] = mapped_column(Integer, nullable=True)
raw_json: Mapped[dict[str, Any] | None] = mapped_column(JSON, nullable=True)
fetched_at: Mapped[dt.datetime] = _fetched_at()
updated_at: Mapped[dt.datetime] = _updated_at()