优化(履约租约): 绑定失败保留账号直到人工释放
- clean 任务 binding_failed 租约改为无限期保留 - Reaper 不再自动释放 clean 绑定失败账号,只保留历史任务旧策略 - 迁移 0133 清理存量 clean 绑定失败租约到期时间 - 工作台显示账号保留中并提供人工释放 - 补充租约/回收测试
This commit is contained in:
@@ -802,6 +802,19 @@ export default function PlatformFulfillmentPage() {
|
||||
}
|
||||
};
|
||||
|
||||
const releaseHeldAccount = (task: PlatformFulfillmentTask) => {
|
||||
Modal.confirm({
|
||||
title: `释放任务 #${task.id} 的保留账号?`,
|
||||
content:
|
||||
'绑定失败账号默认保留到绑定成功或人工释放。释放后任务会回到待分配,客户需要重新选号后刷新二维码。',
|
||||
okText: '释放账号',
|
||||
okButtonProps: { danger: true },
|
||||
cancelText: '取消',
|
||||
onOk: () =>
|
||||
runTaskAction(() => platformFulfillmentApi.release(task.id)),
|
||||
});
|
||||
};
|
||||
|
||||
const requestAllocation = async (task: PlatformFulfillmentTask) => {
|
||||
if (allocatingTaskId !== null) return;
|
||||
setAllocatingTaskId(task.id);
|
||||
@@ -1390,6 +1403,9 @@ export default function PlatformFulfillmentPage() {
|
||||
<Tag color={bindingStatusColor(task.bindingStatus)}>
|
||||
{bindingStatusLabel(task.bindingStatus)}
|
||||
</Tag>
|
||||
{task.account && task.bindingStatus === 'failed' ? (
|
||||
<Tag color="orange">账号保留中</Tag>
|
||||
) : null}
|
||||
<Text>{task.bindTask?.roleName || (task.bindTask?.bindPhase === 'role_ready' ? '角色待确认' : '-')}</Text>
|
||||
{task.bindingStatus === 'bound' ? (
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
@@ -1536,6 +1552,11 @@ export default function PlatformFulfillmentPage() {
|
||||
重新选号并绑定
|
||||
</Button>
|
||||
) : null}
|
||||
{task.account && task.bindingStatus === 'failed' ? (
|
||||
<Button size="small" danger onClick={() => releaseHeldAccount(task)}>
|
||||
释放账号
|
||||
</Button>
|
||||
) : null}
|
||||
{task.executionStatus === 'role_ready' ? (
|
||||
<Button size="small" type="primary" icon={<CheckCircleOutlined />} onClick={() => void runTaskAction(() => platformFulfillmentApi.confirmBinding(task.id))}>
|
||||
代客户确认
|
||||
|
||||
Reference in New Issue
Block a user