From 0be85fee574a036c26ac1f3bbba2b1c6bb0b0e4d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 18 Aug 2022 10:49:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86):=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=88=A0=E9=99=A4api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataset/DataSetTableTaskController.java | 6 ++++++ .../service/dataset/DataSetTableTaskService.java | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableTaskController.java b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableTaskController.java index b00f4df30b..98d355e1ce 100644 --- a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableTaskController.java +++ b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableTaskController.java @@ -49,6 +49,12 @@ public class DataSetTableTaskController { dataSetTableTaskService.delete(id); } + @ApiOperation("批量删除") + @PostMapping("batchDelete/{id}") + public void batchDelete(@RequestBody List ids) { + dataSetTableTaskService.batchDelete(ids); + } + @DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @ApiOperation("查询") @PostMapping("list") diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java index 0543d134af..fdb1d430da 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java @@ -149,6 +149,19 @@ public class DataSetTableTaskService { dataSetTableTaskLogService.deleteByTaskId(id); } + @Transactional + public void batchDelete(List ids) { + if (CollectionUtils.isNotEmpty(ids)){ + for (int i = 0; i < ids.size(); i++) { + String id = ids.get(i); + DatasetTableTask datasetTableTask = datasetTableTaskMapper.selectByPrimaryKey(id); + datasetTableTaskMapper.deleteByPrimaryKey(id); + scheduleService.deleteSchedule(datasetTableTask); + dataSetTableTaskLogService.deleteByTaskId(id); + } + } + } + public void delete(DatasetTableTask task) { datasetTableTaskMapper.deleteByPrimaryKey(task.getId()); scheduleService.deleteSchedule(task); From 8ae8c1dbf9d31c8ed731c3575160e7a5e9acb4b8 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 18 Aug 2022 10:51:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/plugins/config/PluginRunner.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java b/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java index 529889b1e4..db6abc5044 100644 --- a/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java +++ b/backend/src/main/java/io/dataease/plugins/config/PluginRunner.java @@ -62,9 +62,7 @@ public class PluginRunner implements ApplicationRunner { if (CollectionUtils.isEmpty(groupMap.get(false))) return; plugins.stream().forEach(plugin -> { - if (isDiscard(plugin)) { - } String store = plugin.getStore(); String version = plugin.getVersion(); String moduleName = plugin.getModuleName();