feat: add controlled aggregation task deletion

This commit is contained in:
lu7213 committed 2026-10-15 10:42:05 -04:00
1 parent 2a85724613
commit 79f829c12e
4 files changed
+54 -4

No files matched your search

@@ -169,8 +169,24 @@ public class UsdtAggregationTaskController extends BaseController {
return AjaxResult.success(usdtAggregationTaskService.selectUsdtAggregationTaskById(id, true));
}
@PreAuthorize("@ss.hasPermi('system:usdtTask:remove')")
@Log(title = "归集任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable("id") Long id) {
aggregationWorkflowService.deleteTask(id, false);
return AjaxResult.success("删除成功");
}
@PreAuthorize("@ss.hasPermi('system:usdtTask:user-remove')")
@Log(title = "用户归集任务", businessType = BusinessType.DELETE)
@DeleteMapping("/user/{id}")
public AjaxResult userRemove(@PathVariable("id") Long id) {
aggregationWorkflowService.deleteTask(id, true);
return AjaxResult.success("删除成功");
}
/*
* 归集任务的状态、审核结果、目标地址和执行时间必须由工作流维护。
* 不暴露代码生成器的通用新增、编辑和删除接口,防止绕过审核流程。
* 不暴露代码生成器的通用新增和编辑接口;删除必须经过受控状态校验。
*/
}