fix(patrol-delete): 删除条件为空的任务四层拦截——①前端启动前拦截(不再先创建后失败,避免任务残留执行中)并创建时上传delete_conditions ②Java服务端校验删除条件非空(旧版本/直调兜底) ③Python端空条件直接按失败上报,不再逐店空转

This commit is contained in:
2026-09-09 18:59:45 +08:00
parent 0cf20527a4
commit 96e93944d9
4 changed files with 25 additions and 3 deletions
@@ -1062,8 +1062,14 @@ async function processQueue() {
ElMessage.warning("请先匹配可用店铺");
return;
}
if (!selectedDeleteConditions().length) {
// 删除条件为空时任务没有可执行的判定规则,必须在创建任务前拦截,
// 否则 Java 已创建(RUNNING)而 Python 端无事可做,任务会一直停在执行中
ElMessage.warning("请先选择删除条件");
return;
}
const created = await withTransientRetry(
() => createPatrolDeleteTask(runnable.map(buildTaskItem)),
() => createPatrolDeleteTask(runnable.map(buildTaskItem), selectedDeleteConditions()),
(attempt, maxAttempts) => {
queuePushResult.value = `服务暂时不可用,正在重试创建任务(${attempt}/${maxAttempts}...`;
},