diff --git a/core/core-backend/src/main/java/io/dataease/chart/dao/ext/mapper/ExtChartViewMapper.java b/core/core-backend/src/main/java/io/dataease/chart/dao/ext/mapper/ExtChartViewMapper.java index e64704efa4..c6923370fc 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/dao/ext/mapper/ExtChartViewMapper.java +++ b/core/core-backend/src/main/java/io/dataease/chart/dao/ext/mapper/ExtChartViewMapper.java @@ -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); } diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java index ab1f3c525b..b30d141628 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java @@ -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> 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) { diff --git a/de-xpack b/de-xpack index 623e8cb170..475c252508 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 623e8cb1707552d636ebc3882e377d290b6d85ea +Subproject commit 475c252508432a23ec5164a586993e68d2e2e1e0 diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/chart/vo/ChartBaseVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/chart/vo/ChartBaseVO.java index 8fd4d17843..3e89697e05 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/chart/vo/ChartBaseVO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/chart/vo/ChartBaseVO.java @@ -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 xAxis; + + /** + * 横轴field ext + */ + @JsonProperty("xAxisExt") + private List xAxisExt; + + /** + * 纵轴field + */ + @JsonProperty("yAxis") + private List yAxis; + + /** + * 副轴 + */ + @JsonProperty("yAxisExt") + private List yAxisExt; + + /** + * 堆叠项 + */ + private List extStack; + + /** + * 气泡大小 + */ + private List extBubble; + }