forked from github/dataease
feat: 数据集视图接口api
This commit is contained in:
parent
9d88a17080
commit
bbbc249a2e
@ -3,6 +3,7 @@ package io.dataease.api.chart;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.chart.dto.ChartViewDTO;
|
||||
import io.dataease.api.chart.request.ChartExcelRequest;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -18,13 +19,15 @@ import java.util.List;
|
||||
@Tag(name = "视图管理:数据")
|
||||
@ApiSupport(order = 989)
|
||||
public interface ChartDataApi {
|
||||
@Operation(summary = "获取视图数据")
|
||||
@PostMapping("getData")
|
||||
ChartViewDTO getData(@RequestBody ChartViewDTO chartViewDTO) throws Exception;
|
||||
|
||||
@Operation(summary = "导出数据")
|
||||
@PostMapping("innerExportDetails")
|
||||
void innerExportDetails(@RequestBody ChartExcelRequest request, HttpServletResponse response) throws Exception;
|
||||
|
||||
|
||||
@Operation(summary = "获取字段值")
|
||||
@PostMapping("getFieldData/{fieldId}/{fieldType}")
|
||||
List<String> getFieldData(@RequestBody ChartViewDTO view, @PathVariable Long fieldId, @PathVariable String fieldType) throws Exception;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.api.chart;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.chart.dto.ChartViewDTO;
|
||||
import io.dataease.api.chart.dto.ChartViewFieldDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -18,18 +19,23 @@ import java.util.Map;
|
||||
@Tag(name = "视图管理:查看")
|
||||
@ApiSupport(order = 988)
|
||||
public interface ChartViewApi {
|
||||
@Operation(summary = "查询视图详情并同时计算数据", hidden = true)
|
||||
@PostMapping("getChart/{id}")
|
||||
ChartViewDTO getData(@PathVariable Long id) throws Exception;
|
||||
|
||||
@Operation(summary = "获取视图字段")
|
||||
@PostMapping("listByDQ/{id}/{chartId}")
|
||||
Map<String, List<ChartViewFieldDTO>> listByDQ(@PathVariable Long id, @PathVariable Long chartId);
|
||||
|
||||
@Operation(summary = "保存视图")
|
||||
@PostMapping("save")
|
||||
ChartViewDTO save(@RequestBody ChartViewDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "检查是否同数据集")
|
||||
@GetMapping("/checkSameDataSet/{viewIdSource}/{viewIdTarget}")
|
||||
String checkSameDataSet(@PathVariable String viewIdSource, @PathVariable String viewIdTarget);
|
||||
|
||||
@Operation(summary = "查询视图详情")
|
||||
@PostMapping("getDetail/{id}")
|
||||
ChartViewDTO getDetail(@PathVariable Long id);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import io.dataease.api.dataset.dto.DatasetTableDTO;
|
||||
import io.dataease.api.dataset.dto.PreviewSqlDTO;
|
||||
import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
|
||||
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -18,21 +19,27 @@ import java.util.Map;
|
||||
@Tag(name = "数据集管理:数据")
|
||||
@ApiSupport(order = 978)
|
||||
public interface DatasetDataApi {
|
||||
@Operation(summary = "预览数据")
|
||||
@PostMapping("previewData")
|
||||
Map<String, Object> previewData(@RequestBody DatasetGroupInfoDTO datasetGroupInfoDTO) throws Exception;
|
||||
|
||||
@Operation(summary = "获取数据集节点字段")
|
||||
@PostMapping("tableField")
|
||||
List<DatasetTableFieldDTO> tableField(@RequestBody DatasetTableDTO datasetTableDTO) throws Exception;
|
||||
|
||||
@Operation(summary = "SQL预览")
|
||||
@PostMapping("previewSql")
|
||||
Map<String, Object> previewSql(@RequestBody PreviewSqlDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "sql片段校验", hidden = true)
|
||||
@PostMapping("previewSqlCheck")
|
||||
Map<String, Object> previewSqlCheck(@RequestBody PreviewSqlDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "获取字段枚举值")
|
||||
@PostMapping("enumValue")
|
||||
List<String> getFieldEnum(@RequestBody List<Long> ids) throws Exception;
|
||||
|
||||
@Operation(summary = "获取数据集总数据量", hidden = true)
|
||||
@PostMapping("getDatasetCount")
|
||||
Long getDatasetCount(@RequestBody DatasetGroupInfoDTO datasetGroupInfoDTO) throws Exception;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.dataset.dto.MultFieldValuesRequest;
|
||||
import io.dataease.api.dataset.engine.SQLFunctionDTO;
|
||||
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -27,31 +28,39 @@ public interface DatasetTableApi {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Operation(summary = "保存字段")
|
||||
@PostMapping("save")
|
||||
DatasetTableFieldDTO save(@RequestBody DatasetTableFieldDTO datasetTableFieldDTO) throws Exception;
|
||||
|
||||
@Operation(summary = "查询字段")
|
||||
@PostMapping("get/{id}")
|
||||
DatasetTableFieldDTO get(@PathVariable Long id);
|
||||
|
||||
@Operation(summary = "获取数据集字段")
|
||||
@PostMapping("listByDatasetGroup/{id}")
|
||||
List<DatasetTableFieldDTO> listByDatasetGroup(@PathVariable Long id);
|
||||
|
||||
@Operation(summary = "删除字段")
|
||||
@PostMapping("delete/{id}")
|
||||
void delete(@PathVariable Long id);
|
||||
|
||||
@Operation(summary = "获取字段分组")
|
||||
@PostMapping("listByDQ/{id}")
|
||||
Map<String, List<DatasetTableFieldDTO>> listByDQ(@PathVariable Long id);
|
||||
|
||||
@GetMapping ("listWithPermissions/{id}")
|
||||
@Operation(summary = "获取字段")
|
||||
@GetMapping("listWithPermissions/{id}")
|
||||
List<DatasetTableFieldDTO> listFieldsWithPermissions(@PathVariable Long id);
|
||||
|
||||
|
||||
@Operation(summary = "获取枚举值")
|
||||
@PostMapping("multFieldValuesForPermissions")
|
||||
List<String> multFieldValuesForPermissions(@RequestBody MultFieldValuesRequest multFieldValuesRequest) throws Exception;
|
||||
|
||||
@Operation(summary = "获取计算字段函数")
|
||||
@PostMapping("getFunction")
|
||||
List<SQLFunctionDTO> getFunction();
|
||||
|
||||
@Operation(summary = "删除视图计算字段", hidden = true)
|
||||
@PostMapping("deleteByChartId/{id}")
|
||||
void deleteByChartId(@PathVariable Long id);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
import io.dataease.model.BusiNodeVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import java.util.List;
|
||||
|
||||
import static io.dataease.constant.AuthResourceEnum.DATASET;
|
||||
|
||||
@Tag(name = "数据集管理:树")
|
||||
@ApiSupport(order = 979)
|
||||
@DeApiPath(value = "/datasetTree", rt = DATASET)
|
||||
@ -31,10 +33,12 @@ public interface DatasetTreeApi {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Operation(summary = "保存数据集", hidden = true)
|
||||
@DePermit({"#p0.id+':manage'"})
|
||||
@PostMapping("save")
|
||||
DatasetNodeDTO save(@RequestBody DatasetGroupInfoDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "重命名数据集")
|
||||
@DePermit({"#p0.id+':manage'"})
|
||||
@PostMapping("rename")
|
||||
DatasetNodeDTO rename(@RequestBody DatasetGroupInfoDTO dto) throws Exception;
|
||||
@ -46,36 +50,46 @@ public interface DatasetTreeApi {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Operation(summary = "创建数据集")
|
||||
@DePermit({"#p0.pid+':manage'"})
|
||||
@PostMapping("create")
|
||||
DatasetNodeDTO create(@RequestBody DatasetGroupInfoDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "移动数据集")
|
||||
@DePermit({"#p0.id+':manage'", "#p0.pid+':manage'"})
|
||||
@PostMapping("move")
|
||||
DatasetNodeDTO move(@RequestBody DatasetGroupInfoDTO dto) throws Exception;
|
||||
|
||||
@Operation(summary = "删除数据集")
|
||||
@DePermit({"#p0+':manage'"})
|
||||
@PostMapping("delete/{id}")
|
||||
void delete(@PathVariable("id") Long id);
|
||||
|
||||
@Operation(summary = "查询文件夹以及数据集tree")
|
||||
@PostMapping("tree")
|
||||
List<BusiNodeVO> tree(@RequestBody BusiNodeRequest request);
|
||||
|
||||
@Operation(summary = "查询数据集对应用户信息")
|
||||
@GetMapping("/barInfo/{id}")
|
||||
DataSetBarVO barInfo(@PathVariable("id") Long id);
|
||||
|
||||
@Operation(summary = "查询数据集")
|
||||
@PostMapping("get/{id}")
|
||||
DatasetGroupInfoDTO get(@PathVariable("id") Long id) throws Exception;
|
||||
|
||||
@Operation(summary = "获取数据集详情")
|
||||
@PostMapping("details/{id}")
|
||||
DatasetGroupInfoDTO details(@PathVariable("id") Long id) throws Exception;
|
||||
|
||||
@Operation(summary = "获取数据集详情")
|
||||
@PostMapping("dsDetails")
|
||||
List<DatasetTableDTO> panelGetDsDetails(@RequestBody List<Long> ids) throws Exception;
|
||||
|
||||
@Operation(summary = "获取SQL参数")
|
||||
@PostMapping("getSqlParams")
|
||||
List<SqlVariableDetails> getSqlParams(@RequestBody List<Long> ids) throws Exception;
|
||||
|
||||
@Operation(summary = "带权限查询数据集详情")
|
||||
@PostMapping("detailWithPerm")
|
||||
List<DatasetTableDTO> detailWithPerm(@RequestBody List<Long> ids) throws Exception;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user