fix(migrate): 类型迁移SQLite内联修复FTS触发器+多owner群room_id测试+DEPLOY补stamp依据与锁表提示
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -257,6 +257,25 @@ async def test_room_id_filter_returns_matching_groups(make_client):
|
||||
assert body["items"][0]["room_name"] == "群二"
|
||||
|
||||
|
||||
async def test_room_id_filter_multi_owner_one_row_per_owner(make_client):
|
||||
"""同 room_id 多群主(复合 PK 允许)→ room_id 精确过滤返回每个群主一行。"""
|
||||
async def seed(session):
|
||||
session.add_all([
|
||||
ChatGroup(room_id="shared@chatroom", channel="wechat", room_name="共享群",
|
||||
owner_account_id="owner_1", owner_user_id="u1"),
|
||||
ChatGroup(room_id="shared@chatroom", channel="wechat", room_name="共享群",
|
||||
owner_account_id="owner_2", owner_user_id="u2"),
|
||||
])
|
||||
await session.commit()
|
||||
|
||||
client = await make_client(seed)
|
||||
r = await client.get("/api/groups", params={"room_id": "shared@chatroom"})
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert body["total"] == 2
|
||||
assert {it["owner_account_id"] for it in body["items"]} == {"owner_1", "owner_2"}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 群主/建群补充列(2026-08-25 对齐云客员工聊天窗口·微信群 tab)
|
||||
# raw_json 键 ownerName/ownerWchatId/ownerAlias/ownerImage/friendCount/createTime
|
||||
|
||||
Reference in New Issue
Block a user