fix(fulfillment): 恢复 cjm 新角色客户确认

- 回滚 QYOOB-only 门禁,扫到新角色即进入 role_ready
- 客户页 readiness 与平台任务 role_ready 对齐,避免确认接口 409
- 绑定证据 baseline 不再冒充本次扫码
- 新增人工确认绑定接口与按钮(角色、备注、操作人事件)
- 补充客户确认、证据口径和人工确认回归测试
This commit is contained in:
yml
2026-11-24 14:57:39 +08:00
parent 1f53e1a95b
commit 47be8646bf
11 changed files with 573 additions and 74 deletions
@@ -13,6 +13,7 @@ from ..models import User
from ..schemas import (
PlatformFulfillmentCollabSyncRequest,
PlatformFulfillmentCompleteRequest,
PlatformFulfillmentManualBindingRequest,
PlatformFulfillmentMappingUpsert,
PlatformFulfillmentMappingWrite,
PlatformFulfillmentReasonRequest,
@@ -464,6 +465,36 @@ async def confirm_binding(
return result
@router.post("/tasks/{task_id}/bind/manual-confirm")
def manual_confirm_binding(
task_id: int,
req: PlatformFulfillmentManualBindingRequest,
db: Session = Depends(get_db),
current: User = Depends(require_permission("platform_fulfillment:use")),
) -> dict[str, Any]:
"""运营人工确认绑定:用于客户已在别处绑定、或账号当前角色已确认的场景。"""
result = service.manual_confirm_binding_sync(
db,
task_id=task_id,
current=current,
role_name=req.role_name,
note=req.note,
)
record_audit(
db,
current,
action="platform_fulfillment:binding:manual_confirm",
target=f"platform_fulfillment_task:{task_id}",
detail={
"roleName": req.role_name,
"note": req.note,
"bindingStatus": result.get("task", {}).get("bindingStatus"),
},
)
db.commit()
return result
@router.post("/tasks/{task_id}/eligibility/refresh")
def refresh_eligibility(
task_id: int,