mirror of
https://github.com/dataease/dataease.git
synced 2026-05-21 21:15:12 +08:00
feat(数据集):上传excel并解析预览
This commit is contained in:
@@ -7,6 +7,7 @@ import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||
import io.dataease.datasource.dto.TableFiled;
|
||||
import io.dataease.service.dataset.DataSetTableService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@@ -86,4 +87,9 @@ public class DataSetTableController {
|
||||
public Map<String, Object> datasetDetail(@PathVariable String id) {
|
||||
return dataSetTableService.getDatasetDetail(id);
|
||||
}
|
||||
|
||||
@PostMapping("excel/upload")
|
||||
public Map<String, Object> excelUpload(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
return dataSetTableService.excelSaveAndParse(file);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user