fix(fulfillment): 人工确认必须匹配账号当前角色
- 账号当前角色与确认角色不一致时拒绝人工确认 - 前端不一致时禁用确认并提示 - 补充角色不匹配回归测试 - 记录订单 2632801603123492 强制确认问题
This commit is contained in:
@@ -629,7 +629,24 @@ def manual_confirm_binding_sync(
|
||||
status_code=409,
|
||||
detail="账号没有可确认的角色,请先查询角色或填写确认角色",
|
||||
)
|
||||
account_role = str(account.game_name or "").strip()
|
||||
if str(account.role_bind_status or "") != "bound" or not account_role:
|
||||
raise HTTPException(
|
||||
status_code=409,
|
||||
detail="账号当前没有已生效角色,不能人工确认;请先刷新/查询角色",
|
||||
)
|
||||
if account_role != confirmed_role:
|
||||
raise HTTPException(
|
||||
status_code=409,
|
||||
detail=(
|
||||
f"账号当前角色是「{account_role}」,确认角色是「{confirmed_role}」,"
|
||||
"不一致,不能人工确认。人工确认只能用于账号已经绑定到该角色的场景;"
|
||||
"换绑请先完成 actBind 或使用正确账号。"
|
||||
),
|
||||
)
|
||||
note = str(note or "").strip()[:500]
|
||||
if len(note) < 2:
|
||||
raise HTTPException(status_code=409, detail="请填写人工确认依据/备注")
|
||||
previous_binding = str(task.binding_status or "")
|
||||
previous_execution = str(task.execution_status or "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user