feat: 视图高级设置

This commit is contained in:
junjun
2022-03-03 18:30:50 +08:00
parent e2ceda78db
commit 58fd0a56bf
20 changed files with 1000 additions and 378 deletions

View File

@@ -1,39 +1,42 @@
package io.dataease.base.domain;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ChartView implements Serializable {
@ApiModelProperty("ID")
private String id;
@ApiModelProperty("名称")
private String name;
private String title;
private String sceneId;
@ApiModelProperty("数据集ID")
private String tableId;
@ApiModelProperty("图表类型")
private String type;
@ApiModelProperty("渲染方式")
private String render;
@ApiModelProperty("展示结果数量")
private Integer resultCount;
@ApiModelProperty("展示结果")
private String resultMode;
@ApiModelProperty("标题")
private String title;
@ApiModelProperty("场景ID")
private String sceneId;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建时间")
private Long createTime;
@ApiModelProperty("更新时间")
private Long updateTime;
@ApiModelProperty("样式优先级")
private String stylePriority;
@ApiModelProperty("public or private")
private String chartType;
@ApiModelProperty("是否插件")
private Boolean isPlugin;
private static final long serialVersionUID = 1L;
}
}

View File

@@ -244,146 +244,6 @@ public class ChartViewExample {
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andSceneIdIsNull() {
addCriterion("scene_id is null");
return (Criteria) this;
}
public Criteria andSceneIdIsNotNull() {
addCriterion("scene_id is not null");
return (Criteria) this;
}
public Criteria andSceneIdEqualTo(String value) {
addCriterion("scene_id =", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotEqualTo(String value) {
addCriterion("scene_id <>", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdGreaterThan(String value) {
addCriterion("scene_id >", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdGreaterThanOrEqualTo(String value) {
addCriterion("scene_id >=", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLessThan(String value) {
addCriterion("scene_id <", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLessThanOrEqualTo(String value) {
addCriterion("scene_id <=", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLike(String value) {
addCriterion("scene_id like", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotLike(String value) {
addCriterion("scene_id not like", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdIn(List<String> values) {
addCriterion("scene_id in", values, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotIn(List<String> values) {
addCriterion("scene_id not in", values, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdBetween(String value1, String value2) {
addCriterion("scene_id between", value1, value2, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotBetween(String value1, String value2) {
addCriterion("scene_id not between", value1, value2, "sceneId");
return (Criteria) this;
}
public Criteria andTableIdIsNull() {
addCriterion("table_id is null");
return (Criteria) this;
@@ -724,6 +584,146 @@ public class ChartViewExample {
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andSceneIdIsNull() {
addCriterion("scene_id is null");
return (Criteria) this;
}
public Criteria andSceneIdIsNotNull() {
addCriterion("scene_id is not null");
return (Criteria) this;
}
public Criteria andSceneIdEqualTo(String value) {
addCriterion("scene_id =", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotEqualTo(String value) {
addCriterion("scene_id <>", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdGreaterThan(String value) {
addCriterion("scene_id >", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdGreaterThanOrEqualTo(String value) {
addCriterion("scene_id >=", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLessThan(String value) {
addCriterion("scene_id <", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLessThanOrEqualTo(String value) {
addCriterion("scene_id <=", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdLike(String value) {
addCriterion("scene_id like", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotLike(String value) {
addCriterion("scene_id not like", value, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdIn(List<String> values) {
addCriterion("scene_id in", values, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotIn(List<String> values) {
addCriterion("scene_id not in", values, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdBetween(String value1, String value2) {
addCriterion("scene_id between", value1, value2, "sceneId");
return (Criteria) this;
}
public Criteria andSceneIdNotBetween(String value1, String value2) {
addCriterion("scene_id not between", value1, value2, "sceneId");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
@@ -1207,4 +1207,4 @@ public class ChartViewExample {
this(condition, value, secondValue, null);
}
}
}
}

View File

@@ -1,6 +1,8 @@
package io.dataease.base.domain;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -9,27 +11,30 @@ import lombok.ToString;
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ChartViewWithBLOBs extends ChartView implements Serializable {
@ApiModelProperty("x轴")
private String xAxis;
@ApiModelProperty("x副轴")
private String xAxisExt;
@ApiModelProperty("y轴")
private String yAxis;
@ApiModelProperty("y副轴")
private String yAxisExt;
@ApiModelProperty("堆叠字段")
private String extStack;
@ApiModelProperty("气泡大小字段")
private String extBubble;
@ApiModelProperty("图形属性")
private String customAttr;
@ApiModelProperty("组件样式")
private String customStyle;
@ApiModelProperty("过滤器字段")
private String customFilter;
@ApiModelProperty("下钻字段")
private String drillFields;
@ApiModelProperty("高级设置")
private String senior;
@ApiModelProperty("视图截图快照")
private String snapshot;
private static final long serialVersionUID = 1L;
}
}

View File

@@ -4,13 +4,13 @@
<resultMap id="BaseResultMap" type="io.dataease.base.domain.ChartView">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="scene_id" jdbcType="VARCHAR" property="sceneId" />
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="render" jdbcType="VARCHAR" property="render" />
<result column="result_count" jdbcType="INTEGER" property="resultCount" />
<result column="result_mode" jdbcType="VARCHAR" property="resultMode" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="scene_id" jdbcType="VARCHAR" property="sceneId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
@@ -29,6 +29,7 @@
<result column="custom_style" jdbcType="LONGVARCHAR" property="customStyle" />
<result column="custom_filter" jdbcType="LONGVARCHAR" property="customFilter" />
<result column="drill_fields" jdbcType="LONGVARCHAR" property="drillFields" />
<result column="senior" jdbcType="LONGVARCHAR" property="senior" />
<result column="snapshot" jdbcType="LONGVARCHAR" property="snapshot" />
</resultMap>
<sql id="Example_Where_Clause">
@@ -90,12 +91,12 @@
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, title, scene_id, table_id, `type`, render, result_count, result_mode,
id, `name`, table_id, `type`, render, result_count, result_mode, title, scene_id,
create_by, create_time, update_time, style_priority, chart_type, is_plugin
</sql>
<sql id="Blob_Column_List">
x_axis, x_axis_ext, y_axis, y_axis_ext, ext_stack, ext_bubble, custom_attr, custom_style,
custom_filter, drill_fields, snapshot
x_axis, x_axis_ext, y_axis, y_axis_ext, ext_stack, ext_bubble, custom_attr, custom_style,
custom_filter, drill_fields, senior, snapshot
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.ChartViewExample" resultMap="ResultMapWithBLOBs">
select
@@ -128,7 +129,7 @@
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
@@ -146,24 +147,26 @@
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.ChartViewWithBLOBs">
insert into chart_view (id, `name`, title,
scene_id, table_id, `type`,
render, result_count, result_mode,
create_by, create_time, update_time,
style_priority, chart_type, is_plugin,
x_axis, x_axis_ext, y_axis,
y_axis_ext, ext_stack, ext_bubble,
custom_attr, custom_style, custom_filter,
drill_fields, snapshot)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{sceneId,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{render,jdbcType=VARCHAR}, #{resultCount,jdbcType=INTEGER}, #{resultMode,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{stylePriority,jdbcType=VARCHAR}, #{chartType,jdbcType=VARCHAR}, #{isPlugin,jdbcType=BIT},
#{xAxis,jdbcType=LONGVARCHAR}, #{xAxisExt,jdbcType=LONGVARCHAR}, #{yAxis,jdbcType=LONGVARCHAR},
#{yAxisExt,jdbcType=LONGVARCHAR}, #{extStack,jdbcType=LONGVARCHAR}, #{extBubble,jdbcType=LONGVARCHAR},
#{customAttr,jdbcType=LONGVARCHAR}, #{customStyle,jdbcType=LONGVARCHAR}, #{customFilter,jdbcType=LONGVARCHAR},
#{drillFields,jdbcType=LONGVARCHAR}, #{snapshot,jdbcType=LONGVARCHAR})
insert into chart_view (id, `name`, table_id,
`type`, render, result_count,
result_mode, title, scene_id,
create_by, create_time, update_time,
style_priority, chart_type, is_plugin,
x_axis, x_axis_ext, y_axis,
y_axis_ext, ext_stack, ext_bubble,
custom_attr, custom_style, custom_filter,
drill_fields, senior, snapshot
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{render,jdbcType=VARCHAR}, #{resultCount,jdbcType=INTEGER},
#{resultMode,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{stylePriority,jdbcType=VARCHAR}, #{chartType,jdbcType=VARCHAR}, #{isPlugin,jdbcType=BIT},
#{xAxis,jdbcType=LONGVARCHAR}, #{xAxisExt,jdbcType=LONGVARCHAR}, #{yAxis,jdbcType=LONGVARCHAR},
#{yAxisExt,jdbcType=LONGVARCHAR}, #{extStack,jdbcType=LONGVARCHAR}, #{extBubble,jdbcType=LONGVARCHAR},
#{customAttr,jdbcType=LONGVARCHAR}, #{customStyle,jdbcType=LONGVARCHAR}, #{customFilter,jdbcType=LONGVARCHAR},
#{drillFields,jdbcType=LONGVARCHAR}, #{senior,jdbcType=LONGVARCHAR}, #{snapshot,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.ChartViewWithBLOBs">
insert into chart_view
@@ -174,12 +177,6 @@
<if test="name != null">
`name`,
</if>
<if test="title != null">
title,
</if>
<if test="sceneId != null">
scene_id,
</if>
<if test="tableId != null">
table_id,
</if>
@@ -195,6 +192,12 @@
<if test="resultMode != null">
result_mode,
</if>
<if test="title != null">
title,
</if>
<if test="sceneId != null">
scene_id,
</if>
<if test="createBy != null">
create_by,
</if>
@@ -243,6 +246,9 @@
<if test="drillFields != null">
drill_fields,
</if>
<if test="senior != null">
senior,
</if>
<if test="snapshot != null">
snapshot,
</if>
@@ -254,12 +260,6 @@
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="sceneId != null">
#{sceneId,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
@@ -275,6 +275,12 @@
<if test="resultMode != null">
#{resultMode,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="sceneId != null">
#{sceneId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
@@ -323,6 +329,9 @@
<if test="drillFields != null">
#{drillFields,jdbcType=LONGVARCHAR},
</if>
<if test="senior != null">
#{senior,jdbcType=LONGVARCHAR},
</if>
<if test="snapshot != null">
#{snapshot,jdbcType=LONGVARCHAR},
</if>
@@ -343,12 +352,6 @@
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.sceneId != null">
scene_id = #{record.sceneId,jdbcType=VARCHAR},
</if>
<if test="record.tableId != null">
table_id = #{record.tableId,jdbcType=VARCHAR},
</if>
@@ -364,6 +367,12 @@
<if test="record.resultMode != null">
result_mode = #{record.resultMode,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.sceneId != null">
scene_id = #{record.sceneId,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
@@ -412,6 +421,9 @@
<if test="record.drillFields != null">
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
</if>
<if test="record.senior != null">
senior = #{record.senior,jdbcType=LONGVARCHAR},
</if>
<if test="record.snapshot != null">
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR},
</if>
@@ -424,13 +436,13 @@
update chart_view
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
scene_id = #{record.sceneId,jdbcType=VARCHAR},
table_id = #{record.tableId,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
render = #{record.render,jdbcType=VARCHAR},
result_count = #{record.resultCount,jdbcType=INTEGER},
result_mode = #{record.resultMode,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
scene_id = #{record.sceneId,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
@@ -447,6 +459,7 @@
custom_style = #{record.customStyle,jdbcType=LONGVARCHAR},
custom_filter = #{record.customFilter,jdbcType=LONGVARCHAR},
drill_fields = #{record.drillFields,jdbcType=LONGVARCHAR},
senior = #{record.senior,jdbcType=LONGVARCHAR},
snapshot = #{record.snapshot,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -456,13 +469,13 @@
update chart_view
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
scene_id = #{record.sceneId,jdbcType=VARCHAR},
table_id = #{record.tableId,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
render = #{record.render,jdbcType=VARCHAR},
result_count = #{record.resultCount,jdbcType=INTEGER},
result_mode = #{record.resultMode,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
scene_id = #{record.sceneId,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
@@ -479,12 +492,6 @@
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="sceneId != null">
scene_id = #{sceneId,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
@@ -500,6 +507,12 @@
<if test="resultMode != null">
result_mode = #{resultMode,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="sceneId != null">
scene_id = #{sceneId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
@@ -548,6 +561,9 @@
<if test="drillFields != null">
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
</if>
<if test="senior != null">
senior = #{senior,jdbcType=LONGVARCHAR},
</if>
<if test="snapshot != null">
snapshot = #{snapshot,jdbcType=LONGVARCHAR},
</if>
@@ -557,13 +573,13 @@
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.base.domain.ChartViewWithBLOBs">
update chart_view
set `name` = #{name,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
scene_id = #{sceneId,jdbcType=VARCHAR},
table_id = #{tableId,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
render = #{render,jdbcType=VARCHAR},
result_count = #{resultCount,jdbcType=INTEGER},
result_mode = #{resultMode,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
scene_id = #{sceneId,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
@@ -580,19 +596,20 @@
custom_style = #{customStyle,jdbcType=LONGVARCHAR},
custom_filter = #{customFilter,jdbcType=LONGVARCHAR},
drill_fields = #{drillFields,jdbcType=LONGVARCHAR},
senior = #{senior,jdbcType=LONGVARCHAR},
snapshot = #{snapshot,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.ChartView">
update chart_view
set `name` = #{name,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
scene_id = #{sceneId,jdbcType=VARCHAR},
table_id = #{tableId,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
render = #{render,jdbcType=VARCHAR},
result_count = #{resultCount,jdbcType=INTEGER},
result_mode = #{resultMode,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
scene_id = #{sceneId,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
@@ -601,4 +618,4 @@
is_plugin = #{isPlugin,jdbcType=BIT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
</mapper>

View File

@@ -9,9 +9,9 @@
</resultMap>
<select id="searchOneWithPrivileges" resultMap="BaseResultMapDTO">
select
chart_view.*
from chart_view where id = #{id}
select chart_view.*
from chart_view
where id = #{id}
</select>
<select id="searchOne" resultMap="BaseResultMapDTO">
@@ -72,7 +72,7 @@
<where>
FIND_IN_SET(chart_view.id,cids)
<if test="sceneId != null">
and scene_id = #{sceneId,jdbcType=VARCHAR}
and scene_id = #{sceneId,jdbcType=VARCHAR}
</if>
<if test="name != null">
and name like CONCAT('%', #{name},'%')
@@ -83,157 +83,182 @@
</select>
<insert id="chartCopy">
INSERT INTO chart_view (
`id`,
`name`,
`scene_id`,
`table_id`,
`type`,
`title`,
`x_axis`,
`x_axis_ext`,
`y_axis`,
`custom_attr`,
`custom_style`,
`custom_filter`,
`drill_fields`,
`create_by`,
`create_time`,
`update_time`,
`snapshot`,
`style_priority`,
`ext_stack`,
`ext_bubble`,
`y_axis_ext`,
`render`,
`result_count`,
`result_mode`,
`chart_type`
) SELECT
#{newChartId},
GET_CHART_VIEW_COPY_NAME ( #{oldChartId} ),
#{panelId},
`table_id`,
`type`,
GET_CHART_VIEW_COPY_NAME ( #{oldChartId} ),
`x_axis`,
`x_axis_ext`,
`y_axis`,
`custom_attr`,
`custom_style`,
`custom_filter`,
`drill_fields`,
`create_by`,
`create_time`,
`update_time`,
`snapshot`,
`style_priority`,
`ext_stack`,
`ext_bubble`,
`y_axis_ext`,
`render`,
`result_count`,
`result_mode`,
'private'
FROM
chart_view
WHERE
id = #{oldChartId}
INSERT INTO chart_view (`id`,
`name`,
`scene_id`,
`table_id`,
`type`,
`title`,
`x_axis`,
`x_axis_ext`,
`y_axis`,
`custom_attr`,
`custom_style`,
`custom_filter`,
`drill_fields`,
`create_by`,
`create_time`,
`update_time`,
`snapshot`,
`style_priority`,
`ext_stack`,
`ext_bubble`,
`y_axis_ext`,
`render`,
`result_count`,
`result_mode`,
`chart_type`,
`senior`)
SELECT #{newChartId},
GET_CHART_VIEW_COPY_NAME(#{oldChartId}),
#{panelId},
`table_id`,
`type`,
GET_CHART_VIEW_COPY_NAME(#{oldChartId}),
`x_axis`,
`x_axis_ext`,
`y_axis`,
`custom_attr`,
`custom_style`,
`custom_filter`,
`drill_fields`,
`create_by`,
`create_time`,
`update_time`,
`snapshot`,
`style_priority`,
`ext_stack`,
`ext_bubble`,
`y_axis_ext`,
`render`,
`result_count`,
`result_mode`,
'private',
`senior`
FROM chart_view
WHERE id = #{oldChartId}
</insert>
<select id="searchAdviceSceneId" resultType="String">
SELECT DISTINCT
( scene_id )
FROM
( SELECT GET_V_AUTH_MODEL_ID_P_USE ( #{userId}, 'chart' ) cids ) t,
panel_view
LEFT JOIN chart_view ON panel_view.chart_view_id = chart_view.id
LEFT JOIN chart_group ON chart_view.scene_id = chart_group.id
WHERE
FIND_IN_SET( chart_view.scene_id, cids ) and panel_view.panel_id =#{panelId}
ORDER BY
chart_group.create_time DESC
LIMIT 1
SELECT DISTINCT (scene_id)
FROM (SELECT GET_V_AUTH_MODEL_ID_P_USE(#{userId}, 'chart') cids) t,
panel_view
LEFT JOIN chart_view ON panel_view.chart_view_id = chart_view.id
LEFT JOIN chart_group ON chart_view.scene_id = chart_group.id
WHERE FIND_IN_SET(chart_view.scene_id, cids)
and panel_view.panel_id = #{panelId}
ORDER BY chart_group.create_time DESC LIMIT 1
</select>
<select id="checkSameDataSet" resultType="int">
select count(DISTINCT table_id) from chart_view where id = #{viewIdSource} or id = #{viewIdTarget}
select count(DISTINCT table_id)
from chart_view
where id = #{viewIdSource}
or id = #{viewIdTarget}
</select>
<insert id ='chartCopyWithPanel'>
INSERT INTO chart_view (
id,
`name`,
title,
scene_id,
table_id,
`type`,
render,
result_count,
result_mode,
create_by,
create_time,
update_time,
style_priority,
chart_type,
is_plugin,
x_axis,
x_axis_ext,
y_axis,
y_axis_ext,
ext_stack,
ext_bubble,
custom_attr,
custom_style,
custom_filter,
drill_fields,
SNAPSHOT
) SELECT
pv_copy.chart_view_id AS id,
`name`,
title,
pv_copy.panel_id AS scene_id,
table_id,
`type`,
render,
result_count,
result_mode,
create_by,
create_time,
update_time,
style_priority,
chart_type,
is_plugin,
x_axis,
x_axis_ext,
y_axis,
y_axis_ext,
ext_stack,
ext_bubble,
custom_attr,
custom_style,
custom_filter,
drill_fields,
SNAPSHOT
FROM
(
SELECT
panel_id,
copy_from_view,
chart_view_id
FROM
panel_view
WHERE
copy_id = #{copyId}
) pv_copy
LEFT JOIN chart_view ON chart_view.id = pv_copy.copy_from_view
<insert id='chartCopyWithPanel'>
INSERT INTO chart_view (id,
`name`,
title,
scene_id,
table_id,
`type`,
render,
result_count,
result_mode,
create_by,
create_time,
update_time,
style_priority,
chart_type,
is_plugin,
x_axis,
x_axis_ext,
y_axis,
y_axis_ext,
ext_stack,
ext_bubble,
custom_attr,
custom_style,
custom_filter,
drill_fields,
SNAPSHOT)
SELECT pv_copy.chart_view_id AS id,
`name`,
title,
pv_copy.panel_id AS scene_id,
table_id,
`type`,
render,
result_count,
result_mode,
create_by,
create_time,
update_time,
style_priority,
chart_type,
is_plugin,
x_axis,
x_axis_ext,
y_axis,
y_axis_ext,
ext_stack,
ext_bubble,
custom_attr,
custom_style,
custom_filter,
drill_fields,
SNAPSHOT
FROM (
SELECT panel_id,
copy_from_view,
chart_view_id
FROM panel_view
WHERE copy_id = #{copyId}
) pv_copy
LEFT JOIN chart_view ON chart_view.id = pv_copy.copy_from_view
</insert>
<delete id="deleteCircleView">
delete chart_view from (select GET_CHART_GROUP_WITH_CHILDREN(#{pid}) cids) t,chart_view where FIND_IN_SET(chart_view.id,cids) and chart_type='public'
delete
chart_view from (select GET_CHART_GROUP_WITH_CHILDREN(
#{pid}
)
cids
)
t,
chart_view
where
FIND_IN_SET
(
chart_view
.
id,
cids
)
and
chart_type
=
'public'
</delete>
<delete id="deleteCircleGroup">
delete chart_group from (select GET_CHART_GROUP_WITH_CHILDREN(#{pid}) cids) t,chart_group where FIND_IN_SET(chart_group.id,cids)
delete
chart_group from (select GET_CHART_GROUP_WITH_CHILDREN(
#{pid}
)
cids
)
t,
chart_group
where
FIND_IN_SET
(
chart_group
.
id,
cids
)
</delete>
</mapper>

View File

@@ -0,0 +1,2 @@
ALTER TABLE `chart_view` ADD COLUMN `senior` LONGTEXT COMMENT '高级' AFTER `drill_fields`;
UPDATE `chart_view` SET `senior` = '{}';

View File

@@ -60,8 +60,8 @@
</javaClientGenerator>
<!--要生成的数据库表 -->
<table tableName="dataease_code_version"/>
<!-- <table tableName="chart_view"/>-->
<!-- <table tableName="dataease_code_version"/>-->
<table tableName="chart_view"/>
<!-- <table tableName="panel_view"/>-->
<!-- <table tableName="panel_link_jump"/>-->
<!-- <table tableName="panel_link_jump_info"/>-->