diff --git a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableUnionController.java b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableUnionController.java index fd981b1fc1..c9f401e47f 100644 --- a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableUnionController.java +++ b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableUnionController.java @@ -26,17 +26,18 @@ public class DataSetTableUnionController { @Resource private DataSetTableUnionService dataSetTableUnionService; + @DePermission(type = DePermissionType.DATASET, value = "sourceTableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @ApiOperation("保存") @PostMapping("save") public DatasetTableUnion save(@RequestBody DatasetTableUnion datasetTableUnion) { return dataSetTableUnionService.save(datasetTableUnion); } - @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @DePermission(type = DePermissionType.DATASET, value = "sourceTableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @ApiOperation("删除") - @PostMapping("delete/{id}") - public void delete(@PathVariable String id) { - dataSetTableUnionService.delete(id); + @PostMapping("delete") + public void delete(@RequestBody DatasetTableUnion datasetTableUnion) { + dataSetTableUnionService.delete(datasetTableUnion.getId()); } @DePermission(type = DePermissionType.DATASET) diff --git a/frontend/src/views/dataset/data/UnionView.vue b/frontend/src/views/dataset/data/UnionView.vue index 6861d36ce8..c117d87893 100644 --- a/frontend/src/views/dataset/data/UnionView.vue +++ b/frontend/src/views/dataset/data/UnionView.vue @@ -287,7 +287,7 @@ export default { cancelButtonText: this.$t('dataset.cancel'), type: 'warning' }).then(() => { - post('dataset/union/delete/' + item.id, {}).then(response => { + post('dataset/union/delete', item).then(response => { this.$message({ type: 'success', message: this.$t('dataset.delete_success'),