perf(fulfillment): 优化本地能力选号查询与索引

This commit is contained in:
yml
2026-11-23 18:53:06 +08:00
parent d5422b0ecd
commit 7e0d27927c
23 changed files with 1624 additions and 95 deletions
+8 -1
View File
@@ -86,6 +86,7 @@ def _shop_out(shop) -> dict:
return {
"id": int(shop.id),
"name": shop.name,
"aliases": list(shop.aliases or []),
"sort_order": int(shop.sort_order or 0),
"is_active": bool(shop.is_active),
"remark": shop.remark or "",
@@ -750,7 +751,13 @@ def create_collab_shop(
current: User = Depends(require_permission("douyu:collab:edit")),
):
try:
shop = collab.create_shop(db, current, name=req.name, remark=req.remark)
shop = collab.create_shop(
db,
current,
name=req.name,
aliases=req.aliases,
remark=req.remark,
)
except collab.CollabError as exc:
raise _http_error(exc) from exc
_publish_change(current, scope="shops", action="shop.create")