实现虎牙商品兑换并优化列表展示
This commit is contained in:
@@ -18,6 +18,7 @@ SUPPORTED_TASK_TYPES = {
|
||||
"confirm_bind": "确认绑定",
|
||||
"refresh_goods": "刷新商品列表",
|
||||
"refresh_recharge_goods": "刷新充值商品列表",
|
||||
"exchange_goods": "兑换商品",
|
||||
"create_recharge_order": "生成支付二维码",
|
||||
}
|
||||
|
||||
@@ -172,8 +173,8 @@ def create_planned_tasks(
|
||||
batch_id = uuid.uuid4().hex[:12]
|
||||
payload = payload or {}
|
||||
accounts = db.query(HuyaAccount).filter(HuyaAccount.id.in_(account_ids)).all()
|
||||
if task_type in {"refresh_goods", "refresh_recharge_goods", "create_recharge_order"} and accounts:
|
||||
# 全局快照和单笔支付二维码都使用一个选中的 CK 即可。
|
||||
if task_type in {"refresh_goods", "refresh_recharge_goods", "exchange_goods", "create_recharge_order"} and accounts:
|
||||
# 全局快照、单笔兑换和单笔支付二维码都使用一个选中的 CK 即可。
|
||||
accounts = accounts[:1]
|
||||
for account in accounts:
|
||||
db.add(HuyaTask(
|
||||
|
||||
Reference in New Issue
Block a user