forked from github/dataease
perf(X-Pack): 阈值告警条件字段限定视图字段
This commit is contained in:
parent
acbbe416b4
commit
dc3d9b643c
@ -1,7 +1,7 @@
|
||||
package io.dataease.chart.dao.ext.mapper;
|
||||
|
||||
import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.chart.dao.ext.entity.ChartBasePO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
@ -24,10 +24,16 @@ public interface ExtChartViewMapper {
|
||||
ccv.table_id,
|
||||
dvi.id as resource_id,
|
||||
dvi.name as resource_name,
|
||||
dvi.type as resource_type
|
||||
dvi.type as resource_type,
|
||||
ccv.x_axis,
|
||||
ccv.x_axis_ext,
|
||||
ccv.y_axis,
|
||||
ccv.y_axis_ext,
|
||||
ccv.ext_stack,
|
||||
ccv.ext_bubble
|
||||
from core_chart_view ccv
|
||||
left join data_visualization_info dvi on dvi.id = ccv.scene_id
|
||||
where ccv.id = #{id}
|
||||
""")
|
||||
ChartBaseVO queryChart(@Param("id") Long id);
|
||||
ChartBasePO queryChart(@Param("id") Long id);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import io.dataease.api.chart.vo.ChartBaseVO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.dao.ext.entity.ChartBasePO;
|
||||
import io.dataease.chart.dao.ext.mapper.ExtChartViewMapper;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper;
|
||||
@ -246,7 +247,16 @@ public class ChartViewManege {
|
||||
}
|
||||
|
||||
public ChartBaseVO chartBaseInfo(Long id) {
|
||||
return extChartViewMapper.queryChart(id);
|
||||
ChartBasePO po = extChartViewMapper.queryChart(id);
|
||||
ChartBaseVO vo = BeanUtils.copyBean(new ChartBaseVO(), po);
|
||||
TypeReference<List<ChartViewFieldDTO>> tokenType = new TypeReference<>() {};
|
||||
vo.setXAxis(JsonUtil.parseList(po.getXAxis(), tokenType));
|
||||
vo.setXAxisExt(JsonUtil.parseList(po.getXAxisExt(), tokenType));
|
||||
vo.setYAxis(JsonUtil.parseList(po.getYAxis(), tokenType));
|
||||
vo.setYAxisExt(JsonUtil.parseList(po.getYAxisExt(), tokenType));
|
||||
vo.setExtStack(JsonUtil.parseList(po.getExtStack(), tokenType));
|
||||
vo.setExtBubble(JsonUtil.parseList(po.getExtBubble(), tokenType));
|
||||
return vo;
|
||||
}
|
||||
|
||||
public DatasetTableFieldDTO createCountField(Long id) {
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 623e8cb1707552d636ebc3882e377d290b6d85ea
|
||||
Subproject commit 475c252508432a23ec5164a586993e68d2e2e1e0
|
@ -1,11 +1,14 @@
|
||||
package io.dataease.api.chart.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.dataease.extensions.view.dto.ChartViewFieldDTO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChartBaseVO implements Serializable {
|
||||
@ -28,4 +31,36 @@ public class ChartBaseVO implements Serializable {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long tableId;
|
||||
|
||||
@JsonProperty("xAxis")
|
||||
private List<ChartViewFieldDTO> xAxis;
|
||||
|
||||
/**
|
||||
* 横轴field ext
|
||||
*/
|
||||
@JsonProperty("xAxisExt")
|
||||
private List<ChartViewFieldDTO> xAxisExt;
|
||||
|
||||
/**
|
||||
* 纵轴field
|
||||
*/
|
||||
@JsonProperty("yAxis")
|
||||
private List<ChartViewFieldDTO> yAxis;
|
||||
|
||||
/**
|
||||
* 副轴
|
||||
*/
|
||||
@JsonProperty("yAxisExt")
|
||||
private List<ChartViewFieldDTO> yAxisExt;
|
||||
|
||||
/**
|
||||
* 堆叠项
|
||||
*/
|
||||
private List<ChartViewFieldDTO> extStack;
|
||||
|
||||
/**
|
||||
* 气泡大小
|
||||
*/
|
||||
private List<ChartViewFieldDTO> extBubble;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user