refactor(fulfillment): 移除飞飞/乐玩通道,仅保留 affiliate_dash

新单只路由 affiliate_dash(未命中走 manual_dispatch);历史飞飞/乐玩任务保留只读 stub,避免订单重同步失败。同步清理 cloudtentacles 调度、Admin 写路径与相关 env。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-09-14 17:29:47 +08:00
co-authored by Cursor
parent 0cbcb89dd8
commit b3aad0044c
155 changed files with 661 additions and 23351 deletions
@@ -2,7 +2,6 @@ import {
CloseCircleOutlined,
ReloadOutlined,
SearchOutlined,
SwapOutlined,
UserSwitchOutlined,
} from '@ant-design/icons'
import {
@@ -32,7 +31,6 @@ import {
closeAdminTask,
fetchAdminTasks,
markAdminTaskManualReview,
rebindAdminTaskKuaishouCloudRole,
retryAdminTask,
} from '@/services/admin'
import type { AdminTaskActionResponse, AdminTaskListItem } from '@/types/admin'
@@ -52,7 +50,7 @@ type TaskFilterForm = {
dateRange?: unknown
}
type TaskListAction = 'retry' | 'rebind_role' | 'manual_review' | 'close'
type TaskListAction = 'retry' | 'manual_review' | 'close'
type TaskListBlocker = {
label: string
color: string
@@ -72,8 +70,6 @@ export default function AdminTasksPage() {
const page = Number(searchParams.get('page') || 1) || 1
const pageSize = resolveAdminPageSize(searchParams.get('pageSize'), ADMIN_DEFAULT_PAGE_SIZE)
const canManageTaskLifecycle = hasAdminRole('operator')
// 与详情页一致:客服可换绑协助处理(canOperateAssistedTask)
const canRebindRole = hasAdminRole('support')
const canCloseTasks = hasAdminRole('support')
const filters = {
keyword:
@@ -235,12 +231,11 @@ export default function AdminTasksPage() {
canManageTaskLifecycle &&
row.executorKey !== 'manual_dispatch' &&
['retry_pending', 'manual_review'].includes(row.status)
const canRebind = canRebindListTask(row, canRebindRole)
const canManualReview =
canManageTaskLifecycle &&
!['redeemed', 'closed', 'completed', 'manual_review'].includes(row.status)
const canClose = canCloseTasks && !['redeemed', 'closed'].includes(row.status)
const hasActions = canRetry || canRebind || canManualReview || canClose
const hasActions = canRetry || canManualReview || canClose
return (
<div className="cell-stack">
@@ -264,17 +259,6 @@ export default function AdminTasksPage() {
重试
</Button>
) : null}
{canRebind ? (
<Button
size="small"
icon={<SwapOutlined />}
disabled={actionRunning}
loading={rowLoading}
onClick={() => handleActionCommand('rebind_role', row)}
>
换绑
</Button>
) : null}
{canManualReview ? (
<Button
size="small"
@@ -351,14 +335,6 @@ export default function AdminTasksPage() {
}
}
if (actionKey === 'rebind_role') {
return {
action: () => rebindAdminTaskKuaishouCloudRole(item.taskId),
confirmText: `确认为任务 ${item.taskNo} 换绑角色吗?当前虚拟号会退还,并生成新的绑定二维码。`,
successMessage: '角色换绑资源已准备完成',
}
}
if (actionKey === 'manual_review') {
return {
action: () => markAdminTaskManualReview(item.taskId),
@@ -491,24 +467,19 @@ export default function AdminTasksPage() {
)
}
function canRebindListTask(item: AdminTaskListItem, canRebindRole: boolean) {
return (
canRebindRole &&
item.executorKey === 'kuaishou_ct_assisted' &&
['waiting_binding', 'role_confirmed', 'manual_review', 'retry_pending'].includes(item.status)
)
}
function resolveTaskExecutorDisplay(value: unknown) {
const executorKey = String(value || '').trim()
if (executorKey === 'affiliate_dash') {
return { key: executorKey, label: 'Affiliate Dash', color: 'green' }
}
if (executorKey === 'kuaishou_ct_assisted') {
return { key: executorKey, label: '乐玩云', color: 'blue' }
return { key: executorKey, label: '乐玩云(已下线)', color: 'default' }
}
if (executorKey === 'kuaishou-industry') {
return { key: executorKey, label: '行业凭证', color: 'cyan' }
}
if (executorKey === 'kuaishou_feifei') {
return { key: executorKey, label: '飞飞', color: 'purple' }
return { key: executorKey, label: '飞飞(已下线)', color: 'default' }
}
if (executorKey === 'manual_dispatch') {
return { key: executorKey, label: '人工履约', color: 'orange' }
@@ -654,4 +625,4 @@ function cleanParams(params: Record<string, unknown>) {
}
})
return next
}
}