feat: 新增删除采集任务
This commit is contained in:
@@ -95,4 +95,18 @@ public class MaterialTaskController {
|
||||
|
||||
return FuHttpResponse.Builder().dataResponse().build();
|
||||
}
|
||||
|
||||
@ApiOperation("删除采集任务")
|
||||
@CommonLog("删除采集任务")
|
||||
@DeleteMapping("/{id}")
|
||||
public HttpResponse delete(
|
||||
@PathVariable String id
|
||||
) throws Exception {
|
||||
var result = materialTaskService.getById(id);
|
||||
if (result == null) {
|
||||
throw new NcHttpException(HttpErrorResponseEnum.MATERIAL_TASK_NOT_FOUND);
|
||||
}
|
||||
materialTaskService.removeById(id);
|
||||
return FuHttpResponse.Builder().dataResponse().build();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user