feat(douyu-pool): 支持和平精英号池兑换与商品自动刷新,优化号池操作面板

- 扩展号池支持 peace (和平精英/小跑道) 活动 scope,映射 xpd_balance 与 exchange_xpd_goods 任务
- 新增 POST /douyu/pool/refresh-goods 接口与前端一键刷新,支持复用库内有效 CK 自动更新商品快照
- 前端 DouyuPoolPage 升级视觉设计与栅格布局,商品选择器支持按活动类型分类联动
- 修复 DouyuTask.result 类型守卫、account_events actor_id 类型防御与 runner 过滤规则边界值处理
- 验证方式:全量 pytest (797 通过)、pyright (0 错误)、tsc -b 及 ruff format/check 全部通过
This commit is contained in:
yml2213
2026-10-08 13:15:21 +08:00
parent 88422f2f05
commit bb20533c90
8 changed files with 669 additions and 211 deletions
+4 -1
View File
@@ -1642,7 +1642,10 @@ def account_events(
.all()
}
for item in items:
item["actor_name"] = actor_names.get(item.get("actor_id"), "")
actor_id = item.get("actor_id")
item["actor_name"] = (
actor_names.get(actor_id, "") if isinstance(actor_id, int) else ""
)
return {
"items": items,