修复(履约绑定): 修复候选快照丢失与全链路绑定校验一致性
This commit is contained in:
@@ -10,13 +10,13 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from ...models import (
|
||||
AccountLease,
|
||||
DouyuTask,
|
||||
PlatformFulfillmentTask,
|
||||
)
|
||||
from .binding import (
|
||||
confirm_binding,
|
||||
refresh_binding,
|
||||
start_binding,
|
||||
sync_customer_role_to_bind_task,
|
||||
)
|
||||
from .common import FLOW_VERSION_CLEAN, _has_game_home_profile
|
||||
from .order_sync import sync_order_item_ids
|
||||
@@ -100,16 +100,7 @@ def save_customer_profile(
|
||||
task.customer_home_images = images
|
||||
task.customer_profile_updated_at = datetime.now(UTC)
|
||||
task.updated_at = datetime.now(UTC)
|
||||
if task.bind_task_id and task.customer_role_name:
|
||||
bind_task = db.get(DouyuTask, int(task.bind_task_id))
|
||||
if bind_task is not None and bind_task.task_type in {
|
||||
"get_bind_qr",
|
||||
"confirm_bind",
|
||||
}:
|
||||
result = dict(bind_task.result or {})
|
||||
result["expected_role_name"] = task.customer_role_name
|
||||
result["expected_role_required"] = True
|
||||
bind_task.result = result
|
||||
sync_customer_role_to_bind_task(db, task)
|
||||
_append_event(
|
||||
db,
|
||||
task.id,
|
||||
|
||||
Reference in New Issue
Block a user