Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
4d3e2012
提交
4d3e2012
authored
4月 14, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(backend):数据集、视图详情接口
上级
924f6396
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
33 行增加
和
0 行删除
+33
-0
ChartViewController.java
...ava/io/dataease/controller/chart/ChartViewController.java
+5
-0
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+4
-0
ChartViewService.java
...main/java/io/dataease/service/chart/ChartViewService.java
+12
-0
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+12
-0
没有找到文件。
backend/src/main/java/io/dataease/controller/chart/ChartViewController.java
浏览文件 @
4d3e2012
...
@@ -44,4 +44,9 @@ public class ChartViewController {
...
@@ -44,4 +44,9 @@ public class ChartViewController {
public
ChartViewDTO
getData
(
@PathVariable
String
id
)
throws
Exception
{
public
ChartViewDTO
getData
(
@PathVariable
String
id
)
throws
Exception
{
return
chartViewService
.
getData
(
id
);
return
chartViewService
.
getData
(
id
);
}
}
@PostMapping
(
"chartDetail/{id}"
)
public
Map
<
String
,
Object
>
chartDetail
(
@PathVariable
String
id
)
{
return
chartViewService
.
getChartDetail
(
id
);
}
}
}
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
4d3e2012
...
@@ -82,4 +82,8 @@ public class DataSetTableController {
...
@@ -82,4 +82,8 @@ public class DataSetTableController {
dataSetTableService
.
saveIncrementalConfig
(
datasetTableIncrementalConfig
);
dataSetTableService
.
saveIncrementalConfig
(
datasetTableIncrementalConfig
);
}
}
@PostMapping
(
"datasetDetail/{id}"
)
public
Map
<
String
,
Object
>
datasetDetail
(
@PathVariable
String
id
)
{
return
dataSetTableService
.
getDatasetDetail
(
id
);
}
}
}
backend/src/main/java/io/dataease/service/chart/ChartViewService.java
浏览文件 @
4d3e2012
...
@@ -20,6 +20,7 @@ import io.dataease.service.dataset.DataSetTableFieldsService;
...
@@ -20,6 +20,7 @@ import io.dataease.service.dataset.DataSetTableFieldsService;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.dataease.service.dataset.DataSetTableService
;
import
io.dataease.service.spark.SparkCalc
;
import
io.dataease.service.spark.SparkCalc
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -249,4 +250,15 @@ public class ChartViewService {
...
@@ -249,4 +250,15 @@ public class ChartViewService {
throw
new
RuntimeException
(
"Name can't repeat in same group."
);
throw
new
RuntimeException
(
"Name can't repeat in same group."
);
}
}
}
}
public
Map
<
String
,
Object
>
getChartDetail
(
String
id
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
ChartViewWithBLOBs
chartViewWithBLOBs
=
chartViewMapper
.
selectByPrimaryKey
(
id
);
map
.
put
(
"chart"
,
chartViewWithBLOBs
);
if
(
ObjectUtils
.
isNotEmpty
(
chartViewWithBLOBs
))
{
Map
<
String
,
Object
>
datasetDetail
=
dataSetTableService
.
getDatasetDetail
(
chartViewWithBLOBs
.
getTableId
());
map
.
putAll
(
datasetDetail
);
}
return
map
;
}
}
}
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
4d3e2012
...
@@ -16,6 +16,7 @@ import io.dataease.datasource.provider.ProviderFactory;
...
@@ -16,6 +16,7 @@ import io.dataease.datasource.provider.ProviderFactory;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.datasource.request.DatasourceRequest
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
io.dataease.dto.dataset.DataTableInfoDTO
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -422,4 +423,15 @@ public class DataSetTableService {
...
@@ -422,4 +423,15 @@ public class DataSetTableService {
throw
new
RuntimeException
(
"Name can't repeat in same group."
);
throw
new
RuntimeException
(
"Name can't repeat in same group."
);
}
}
}
}
public
Map
<
String
,
Object
>
getDatasetDetail
(
String
id
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
DatasetTable
table
=
datasetTableMapper
.
selectByPrimaryKey
(
id
);
map
.
put
(
"table"
,
table
);
if
(
ObjectUtils
.
isNotEmpty
(
table
))
{
Datasource
datasource
=
datasourceMapper
.
selectByPrimaryKey
(
table
.
getDataSourceId
());
map
.
put
(
"datasource"
,
datasource
);
}
return
map
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论