feat(履约绑定): 支持工作台修改客户资料、扫码不匹配时间线及确认后斗鱼复核
This commit is contained in:
@@ -13,6 +13,7 @@ from ..models import User
|
||||
from ..schemas import (
|
||||
PlatformFulfillmentCollabSyncRequest,
|
||||
PlatformFulfillmentCompleteRequest,
|
||||
PlatformFulfillmentCustomerProfileUpdate,
|
||||
PlatformFulfillmentManualBindingRequest,
|
||||
PlatformFulfillmentMappingUpsert,
|
||||
PlatformFulfillmentMappingWrite,
|
||||
@@ -524,6 +525,58 @@ def manual_confirm_binding(
|
||||
return result
|
||||
|
||||
|
||||
@router.patch("/tasks/{task_id}/customer-profile")
|
||||
def update_customer_profile(
|
||||
task_id: int,
|
||||
req: PlatformFulfillmentCustomerProfileUpdate,
|
||||
db: Session = Depends(get_db),
|
||||
current: User = Depends(require_permission("platform_fulfillment:use")),
|
||||
) -> dict[str, Any]:
|
||||
"""运营在履约工作台修改客户填写的游戏角色、登录方式与系统。"""
|
||||
result = service.update_customer_profile_by_operator(
|
||||
db,
|
||||
task_id=task_id,
|
||||
current=current,
|
||||
customer_role_name=req.customer_role_name,
|
||||
platform=req.customer_platform,
|
||||
system=req.customer_system,
|
||||
reopen_binding=req.reopen_binding,
|
||||
)
|
||||
record_audit(
|
||||
db,
|
||||
current,
|
||||
action="platform_fulfillment:customer_profile:update",
|
||||
target=f"platform_fulfillment_task:{task_id}",
|
||||
detail={
|
||||
"customerRoleName": req.customer_role_name,
|
||||
"customerPlatform": req.customer_platform,
|
||||
"customerSystem": req.customer_system,
|
||||
"reopenBinding": req.reopen_binding,
|
||||
},
|
||||
)
|
||||
db.commit()
|
||||
return result
|
||||
|
||||
|
||||
@router.post("/tasks/{task_id}/bind/verify")
|
||||
async def verify_binding(
|
||||
task_id: int,
|
||||
db: Session = Depends(get_db),
|
||||
current: User = Depends(require_permission("platform_fulfillment:use")),
|
||||
) -> dict[str, Any]:
|
||||
"""去斗鱼再次实时查询并复核当前绑定是否真正生效。"""
|
||||
result = await service.verify_task_binding(db, task_id=task_id, current=current)
|
||||
record_audit(
|
||||
db,
|
||||
current,
|
||||
action="platform_fulfillment:binding:verify",
|
||||
target=f"platform_fulfillment_task:{task_id}",
|
||||
detail={"bindingStatus": result.get("task", {}).get("bindingStatus")},
|
||||
)
|
||||
db.commit()
|
||||
return result
|
||||
|
||||
|
||||
@router.post("/tasks/{task_id}/eligibility/refresh")
|
||||
def refresh_eligibility(
|
||||
task_id: int,
|
||||
|
||||
Reference in New Issue
Block a user