feat(douyu): 兑换图片默认隐藏 + 供应商直充默认上限800

- 兑换图片仅显示本页面本次发起过兑换的账号,历史截图默认不展示
- douyu_config 增加 gold_api_max_amount,默认800
- 配置弹窗可修改,输入框按上限 clamp,执行器下单前再校验
- 新增迁移0130,补充配置/超限测试
This commit is contained in:
yml
2026-11-24 20:00:31 +08:00
parent 77a881bdf8
commit 7a5d3ae9c8
12 changed files with 158 additions and 4 deletions
@@ -575,6 +575,11 @@ class GoldMixin:
amount: int,
) -> None:
"""创建供应商鱼翅直充订单并轮询订单状态。"""
max_amount = int(config.get("gold_api_max_amount") or 800)
if amount > max_amount:
raise FishFinRechargeError(
f"单笔供应商直充不能超过 {max_amount} 鱼翅(当前 {amount})"
)
product_id = str(config.get("gold_api_product_id") or "").strip()
template_name = str(
config.get("gold_api_account_template_name") or "斗鱼昵称"