修复(履约绑定): 后台人工绑定也必须先有客户游戏资料
- 工作台 start/confirm/代确认/强制确认入口统一校验角色和主页截图 - 仅 clean 任务强制,历史任务保持兼容 - 补充后台绑定资料校验测试
This commit is contained in:
@@ -44,7 +44,7 @@ from .binding_status import (
|
||||
_binding_failure_raw_message,
|
||||
_customer_task_message,
|
||||
)
|
||||
from .common import _now
|
||||
from .common import FLOW_VERSION_CLEAN, _has_game_home_profile, _now
|
||||
from .outbox import _emit_order_site_binding_state
|
||||
from .repository import (
|
||||
_binding_qr_expired,
|
||||
@@ -1494,6 +1494,12 @@ def reconcile_binding_state_outbox(
|
||||
}
|
||||
|
||||
|
||||
def ensure_customer_profile_for_binding(db: Session, *, task_id: int) -> None:
|
||||
task = _load_task(db, task_id)
|
||||
if task.flow_version == FLOW_VERSION_CLEAN and not _has_game_home_profile(task):
|
||||
raise HTTPException(status_code=409, detail="请先提交游戏角色和游戏主页截图")
|
||||
|
||||
|
||||
def confirm_binding_sync(db: Session, *, task_id: int, current: User) -> dict[str, Any]:
|
||||
task = _load_task_for_update(db, task_id)
|
||||
task = _load_task(db, refresh_binding(db, task_id=task.id)["task"]["id"])
|
||||
|
||||
@@ -29,6 +29,7 @@ from .allocation import ( # noqa: F401
|
||||
from .binding import ( # noqa: F401
|
||||
confirm_binding,
|
||||
confirm_binding_sync,
|
||||
ensure_customer_profile_for_binding,
|
||||
manual_confirm_binding_sync,
|
||||
operator_confirm_binding_sync,
|
||||
reconcile_binding_observations,
|
||||
|
||||
Reference in New Issue
Block a user