Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangjiahao 2022-08-18 11:41:08 +08:00
commit e94cc53104
3 changed files with 19 additions and 2 deletions

View File

@ -49,6 +49,12 @@ public class DataSetTableTaskController {
dataSetTableTaskService.delete(id);
}
@ApiOperation("批量删除")
@PostMapping("batchDelete/{id}")
public void batchDelete(@RequestBody List<String> ids) {
dataSetTableTaskService.batchDelete(ids);
}
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("查询")
@PostMapping("list")

View File

@ -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();

View File

@ -149,6 +149,19 @@ public class DataSetTableTaskService {
dataSetTableTaskLogService.deleteByTaskId(id);
}
@Transactional
public void batchDelete(List<String> 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);