From d7ad1b86d280552add54c4168fe902fd9a8ebccc Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 28 Oct 2021 17:22:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=AE=BE=E7=BD=AE=E7=BB=93=E6=9E=9C=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/base/domain/ChartView.java | 6 +- .../base/domain/ChartViewExample.java | 132 +++++++++++++++++- .../dataease/base/mapper/ChartViewMapper.xml | 76 +++++++--- .../service/chart/ChartViewService.java | 5 +- .../resources/db/migration/V27__de1.4.sql | 5 + .../src/main/resources/generatorConfig.xml | 1 + frontend/src/lang/en.js | 4 +- frontend/src/lang/tw.js | 4 +- frontend/src/lang/zh.js | 4 +- frontend/src/views/chart/view/ChartEdit.vue | 29 ++++ .../src/views/dataset/data/TabDataPreview.vue | 7 +- 11 files changed, 244 insertions(+), 29 deletions(-) diff --git a/backend/src/main/java/io/dataease/base/domain/ChartView.java b/backend/src/main/java/io/dataease/base/domain/ChartView.java index 4744402b39..69777d3f87 100644 --- a/backend/src/main/java/io/dataease/base/domain/ChartView.java +++ b/backend/src/main/java/io/dataease/base/domain/ChartView.java @@ -19,6 +19,10 @@ public class ChartView implements Serializable { private String type; @ApiModelProperty("chart渲染方式") private String render; + @ApiModelProperty("展示结果") + private Integer resultCount; + @ApiModelProperty("展示模式") + private String resultMode; @ApiModelProperty("标题") private String title; @ApiModelProperty("创建人") @@ -31,4 +35,4 @@ public class ChartView implements Serializable { private String stylePriority; private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/ChartViewExample.java b/backend/src/main/java/io/dataease/base/domain/ChartViewExample.java index aa4203c735..9def62d21e 100644 --- a/backend/src/main/java/io/dataease/base/domain/ChartViewExample.java +++ b/backend/src/main/java/io/dataease/base/domain/ChartViewExample.java @@ -524,6 +524,136 @@ public class ChartViewExample { return (Criteria) this; } + public Criteria andResultCountIsNull() { + addCriterion("result_count is null"); + return (Criteria) this; + } + + public Criteria andResultCountIsNotNull() { + addCriterion("result_count is not null"); + return (Criteria) this; + } + + public Criteria andResultCountEqualTo(Integer value) { + addCriterion("result_count =", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountNotEqualTo(Integer value) { + addCriterion("result_count <>", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountGreaterThan(Integer value) { + addCriterion("result_count >", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountGreaterThanOrEqualTo(Integer value) { + addCriterion("result_count >=", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountLessThan(Integer value) { + addCriterion("result_count <", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountLessThanOrEqualTo(Integer value) { + addCriterion("result_count <=", value, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountIn(List values) { + addCriterion("result_count in", values, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountNotIn(List values) { + addCriterion("result_count not in", values, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountBetween(Integer value1, Integer value2) { + addCriterion("result_count between", value1, value2, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultCountNotBetween(Integer value1, Integer value2) { + addCriterion("result_count not between", value1, value2, "resultCount"); + return (Criteria) this; + } + + public Criteria andResultModeIsNull() { + addCriterion("result_mode is null"); + return (Criteria) this; + } + + public Criteria andResultModeIsNotNull() { + addCriterion("result_mode is not null"); + return (Criteria) this; + } + + public Criteria andResultModeEqualTo(String value) { + addCriterion("result_mode =", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeNotEqualTo(String value) { + addCriterion("result_mode <>", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeGreaterThan(String value) { + addCriterion("result_mode >", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeGreaterThanOrEqualTo(String value) { + addCriterion("result_mode >=", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeLessThan(String value) { + addCriterion("result_mode <", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeLessThanOrEqualTo(String value) { + addCriterion("result_mode <=", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeLike(String value) { + addCriterion("result_mode like", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeNotLike(String value) { + addCriterion("result_mode not like", value, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeIn(List values) { + addCriterion("result_mode in", values, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeNotIn(List values) { + addCriterion("result_mode not in", values, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeBetween(String value1, String value2) { + addCriterion("result_mode between", value1, value2, "resultMode"); + return (Criteria) this; + } + + public Criteria andResultModeNotBetween(String value1, String value2) { + addCriterion("result_mode not between", value1, value2, "resultMode"); + return (Criteria) this; + } + public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; @@ -947,4 +1077,4 @@ public class ChartViewExample { this(condition, value, secondValue, null); } } -} +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/ChartViewMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ChartViewMapper.xml index 270765ab1f..1bdedbf438 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ChartViewMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ChartViewMapper.xml @@ -8,6 +8,8 @@ + + @@ -85,11 +87,11 @@ - id, `name`, scene_id, table_id, `type`, render, title, create_by, create_time, update_time, - style_priority + id, `name`, scene_id, table_id, `type`, render, result_count, result_mode, title, + create_by, create_time, update_time, style_priority - x_axis, y_axis, y_axis_ext, ext_stack, ext_bubble, custom_attr, custom_style, custom_filter, + x_axis, y_axis, y_axis_ext, ext_stack, ext_bubble, custom_attr, custom_style, custom_filter, drill_fields, snapshot