fix(platform-fulfillment): 允许预售单提前绑定账号

This commit is contained in:
yml
2026-11-22 00:45:53 +08:00
parent 0ac6c7e82e
commit 5f5a9a0bbe
4 changed files with 245 additions and 13 deletions
@@ -20,6 +20,7 @@ from ..models import Account
from .account_binding import is_role_change_cooling
from .account_capability_service import (
AVAILABILITY_AVAILABLE,
AVAILABILITY_NOT_OPEN,
classify_goods_items,
)
from .cookie_check_service import check_douyu_cookie
@@ -46,6 +47,7 @@ class DouyuLiveAccountState:
self,
*,
commodity_id: str,
allow_not_open: bool = False,
) -> list[str]:
reasons: list[str] = []
if self.ck_verdict != "valid":
@@ -58,6 +60,9 @@ class DouyuLiveAccountState:
availability = self.commodity_availability.get(commodity_id)
if availability is None:
reasons.append("官方商品列表本次未返回该商品,可能已下架")
elif allow_not_open and availability == AVAILABILITY_NOT_OPEN:
# 2026-11-22:预售单允许在礼包开放前提前绑定,未开放不是硬阻塞。
pass
elif availability != AVAILABILITY_AVAILABLE:
reasons.append(
self.commodity_blocking_reasons.get(commodity_id)