提交 c496b65e authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 放开excel上传api

上级 1359a673
...@@ -10,9 +10,7 @@ import io.dataease.dto.datasource.TableFiled; ...@@ -10,9 +10,7 @@ import io.dataease.dto.datasource.TableFiled;
import io.dataease.dto.dataset.DataSetTableDTO; import io.dataease.dto.dataset.DataSetTableDTO;
import io.dataease.dto.dataset.ExcelFileData; import io.dataease.dto.dataset.ExcelFileData;
import io.dataease.service.dataset.DataSetTableService; import io.dataease.service.dataset.DataSetTableService;
import io.swagger.annotations.Api; import io.swagger.annotations.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -132,8 +130,13 @@ public class DataSetTableController { ...@@ -132,8 +130,13 @@ public class DataSetTableController {
return dataSetTableService.getDatasetDetail(id); return dataSetTableService.getDatasetDetail(id);
} }
// @ApiOperation("excel上传") @ApiOperation("excel上传")
@PostMapping("excel/upload") @PostMapping("excel/upload")
@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "文件", required = true, dataType = "MultipartFile"),
@ApiImplicitParam(name = "tableId", value = "数据表ID", required = true, dataType = "String"),
@ApiImplicitParam(name = "editType", value = "编辑类型", required = true, dataType = "Integer")
})
public ExcelFileData excelUpload(@RequestParam("file") MultipartFile file, @RequestParam("tableId") String tableId, @RequestParam("editType") Integer editType) throws Exception { public ExcelFileData excelUpload(@RequestParam("file") MultipartFile file, @RequestParam("tableId") String tableId, @RequestParam("editType") Integer editType) throws Exception {
return dataSetTableService.excelSaveAndParse(file, tableId, editType); return dataSetTableService.excelSaveAndParse(file, tableId, editType);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论