refactor(fulfillment): 拆分履约服务并修正换绑冷却分类
This commit is contained in:
@@ -21,9 +21,9 @@ from .account_binding import (
|
||||
SCOPE_ESPORTS,
|
||||
binding_pending_decision,
|
||||
binding_snapshot,
|
||||
classify_bind_cooldown,
|
||||
is_bound_act,
|
||||
is_pending_binding_role,
|
||||
is_platform_account_bind_cooldown,
|
||||
is_role_change_cooling,
|
||||
role_change_available_at,
|
||||
set_bind_status,
|
||||
@@ -1619,7 +1619,7 @@ class BindMixin:
|
||||
source="douyu_task.confirm_bind",
|
||||
act_alias=use_confirm_alias,
|
||||
)
|
||||
account_cooldown = is_platform_account_bind_cooldown(
|
||||
cooldown_kind = classify_bind_cooldown(
|
||||
confirm_code,
|
||||
confirm_msg,
|
||||
)
|
||||
@@ -1627,7 +1627,7 @@ class BindMixin:
|
||||
before_bound_role = str(before_bound_snapshot["role_name"] or "")
|
||||
before_bound_wait = before_bound_snapshot["change_role_wait_time"]
|
||||
before_bound_wait_text = self._format_wait_time(before_bound_wait)
|
||||
if account_cooldown:
|
||||
if cooldown_kind == "platform":
|
||||
issue_code = "account_role_cooldown"
|
||||
role_label = before_bound_role or role_name or "当前角色"
|
||||
suffix = f",剩余 {before_bound_wait_text}" if before_bound_wait_text else ""
|
||||
@@ -1635,12 +1635,18 @@ class BindMixin:
|
||||
f"斗鱼账号当前绑定角色({role_label})未到可换绑时间"
|
||||
f"{suffix},请更换斗鱼账号或稍后重试"
|
||||
)
|
||||
else:
|
||||
elif cooldown_kind == "customer":
|
||||
issue_code = "customer_role_cooldown"
|
||||
failure_message = (
|
||||
f"待绑定游戏账号({role_name or '-'})未到换绑时间"
|
||||
"(不是斗鱼/虎牙账号),请重新换账号扫码绑定"
|
||||
)
|
||||
else:
|
||||
issue_code = "binding_failed"
|
||||
failure_message = (
|
||||
f"确认绑定失败:{confirm_msg or '斗鱼接口返回异常'}"
|
||||
",请稍后重试或联系客服"
|
||||
)
|
||||
# 2026-11-22 换绑失败 HAR:actBind 已拒绝时新角色只存在于 cjm 候选态,
|
||||
# 活动 alias 仍是原绑定。必须保留旧角色,不能让失败角色污染账号库。
|
||||
if before_bound is not None:
|
||||
|
||||
Reference in New Issue
Block a user