From b8f95eefabf98aa446a388bb4cec8783dd9298db Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 15 Jun 2021 18:17:38 +0800 Subject: [PATCH 01/15] =?UTF-8?q?feat:=20=E9=A2=84=E8=A7=88=E5=92=8C?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9B=B8=E5=90=8C=E7=9A=84gap=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Editor/ComponentWrapper.vue | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index ff904a47d8..285c7ed2d8 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -1,24 +1,25 @@ @@ -54,6 +55,26 @@ export default { methods: { getStyle, + getOutStyleDefault(style) { + const result = {}; + ['width', 'left'].forEach(attr => { + result[attr] = style[attr] + 'px' + }); + ['height', 'top'].forEach(attr => { + result[attr] = style[attr] + 'px' + }) + result['rotate'] = style['rotate'] + result['opacity'] = style['opacity'] + + return result + // return style + }, + + getComponentStyleDefault(style) { + return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) + // return style + }, + handleClick() { const events = this.config.events Object.keys(events).forEach(event => { @@ -68,4 +89,8 @@ export default { .component { position: absolute; } + +.gap_class{ + padding:3px; +} From 1c4d9fe371bf689f6f94fd8b08b0ca75c36e41c7 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 15 Jun 2021 18:26:01 +0800 Subject: [PATCH 02/15] =?UTF-8?q?feat(fix):=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=AD=97=E6=AE=B5=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 56d212fcc9..911b126d40 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -567,7 +567,7 @@ public class DataSetTableService { List list = dataTableInfoDTO.getList(); List fieldList = new ArrayList<>(); list.forEach(ele -> { - List listByIds = dataSetTableFieldsService.getListByIds(ele.getCheckedFields()); + List listByIds = dataSetTableFieldsService.getListByIdsEach(ele.getCheckedFields()); listByIds.forEach(f -> { f.setDataeaseName(DorisTableUtils.dorisFieldName(ele.getTableId() + "_" + f.getDataeaseName())); }); From dce12e6057680926e58ed1eddf787d16502ebdd2 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 15 Jun 2021 18:52:33 +0800 Subject: [PATCH 03/15] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E6=A0=B7=E5=BC=8F=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/components/Topbar.vue | 2 +- frontend/src/layout/index.vue | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 56993f6b4a..8826e2dfef 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -9,7 +9,7 @@ :active-text-color="variables.topMenuActiveText" :default-active="activeMenu" mode="horizontal" - :style="{'background-color': '#f1f3f8'}" + :style="{'background-color': '#f1f3f8', 'margin-left': '260px', 'position': 'absolute'}" @select="handleSelect" > - + diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index f9f30d7dec..86dd1a4d30 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -47,7 +47,7 @@
- +
From b9d4267f90a36dbe5431724c4902a7cc5035fcdc Mon Sep 17 00:00:00 2001 From: xuwei-fit2cloud Date: Wed, 16 Jun 2021 09:40:15 +0800 Subject: [PATCH 06/15] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 213 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4abf20cc0d..25f1d1dff5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,213 @@ -# dataease -DataEase +# DataEase 开源数据可视化分析平台 + +DataEase 是开源的数据可视化分析工具,帮助用户分析数据、改善业务。DataEase 支持丰富的数据源连接,能够通过拖拉拽方式快速制作图表,并可以方便的与他人分享。 + +- 图表展示: 支持 PC 端、移动端及大屏; +- 图表制作: 支持丰富的图表类型(基于 Apache ECharts 实现)、支持拖拉拽方式快速制作仪表板; +- 数据引擎: 支持直连模式、本地模式(基于 Apache Doris / Kettle 实现); +- 数据连接: 支持关系型数据库、Excel 等文件、Hadoop 等大数据平台、NoSQL 等各种数据源。 + +## 功能架构 + +TBD + +## UI 展示 + +TBD + +## 快速开始 + +仅需两步快速安装 DataEase: + +1. 准备一台不小于 16 G内存的 64位 Linux 主机; +2. 以 root 用户执行如下命令一键安装 DataEase。 + +```sh +curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_start.sh | sh +``` + +文档和演示视频: + +- [完整文档](https://dataease.io/docs/) +- [演示视频] TBD + +## 版本说明 + +DataEase 版本号命名规则为:v大版本.功能版本.Bug修复版本。比如: + +```text +v1.0.1 是 v1.0.0 之后的 Bug 修复版本; +v1.1.0 是 v1.0.0 之后的功能版本。 +``` + +像其它优秀开源项目一样,DataEase 将每月发布一个功能版本。 + +## 产品优势 + +- 开源开放:零门槛,线上快速获取和安装;快速获取用户反馈、按月发布新版本; +- 简单易用:极易上手,通过鼠标点击和拖拽即可完成分析; +- 秒级响应:集成 Apache Doris,超大数据量下秒级查询返回延时; +- 安全分享:支持多种数据分享方式,确保数据安全。 + +## 功能列表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
仪表板仪表板管理在线编辑仪表板
仪表板展示内容支持视图/时间组件/文本组件/数字组件/样式组件等
支持视图及组件样式的设置
支持仪表板主题
支持仪表板的全屏预览
支持仪表板模板的导出
以树状形式展示仪表板分组
支持仪表板分组的拖拽排序
支持默认仪表板的设置
支持仪表板的收藏
仪表板分享支持按组织/角色/用户分享
支持生成外部可访问的带密码保护的分享链接
视图视图管理在线编辑视图
支持可视化拖拽进行视图操作
支持明细表/指标卡/基础柱状图/堆叠柱状图/横向柱状图/横向堆叠柱状图/基础折线图/堆叠折线图/饼图/南丁格尔玫瑰图/漏斗图/雷达图/仪表盘等多种图表类型
支持维度/指标的排序展示
支持指标的多种汇总计算方式
支持对图表类型的图形属性进行设置
支持对图表类型的组件样式进行设置
支持过滤条件筛选视图展示的数据
支持下载视图图片
数据集数据集管理支持数据库数据集/SQL 数据集/Excel 数据集/自定义数据集等多种类型的数据集
数据库数据集和 SQL 数据集支持直连和定时同步两种连接方式
定时同步类型数据集支持全量更新和增量更新两种方式
支持定时更新的频率控制
支持定时更新任务的查看
支持对数据集的字段类型/字段名/展示字段进行设置
支持创建不同类型数据集与数据集之间的关联
支持 Excel 数据集数据的替换和更新
数据源数据源管理支持 MySQL 和 SQL Server 类型的数据源
支持对数据源有效性校验
系统管理用户租户管理支持多级租户体系
支持多种租户角色
权限管理支持组织/角色/用户三个维度的权限管理
支持数据源/数据集/视图/仪表板/菜单和操作权限的细颗粒度权限控制
显示设置支持对Logo/系统名/标题等属性的设置
+ + + +## 技术栈 + +- 后端: [Spring Boot](https://www.tutorialspoint.com/spring_boot/spring_boot_introduction.htm) +- 前端: [Vue.js](https://vuejs.org/) +- 中间件: [MySQL](https://www.mysql.com/) +- 数据处理: [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/), [Apache Doris](https://doris.apache.org/) +- 基础设施: [Docker](https://www.docker.com/) + +## 致谢 + +- [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/):DataEase 使用了 Kettle 进行数据处理工作 +- [Apache Doris](https://doris.apache.org/):DataEase 使用了 Apache Doris 进行快速的数据分析 +- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库 + +## 微信群 + +![wechat-group](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png) + + +## License & Copyright + +Copyright (c) 2014-2021 飞致云 FIT2CLOUD, All rights reserved. + +Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + From 2cd4eef984520ca19fd6219bd3a75559050287a4 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 16 Jun 2021 09:47:19 +0800 Subject: [PATCH 07/15] =?UTF-8?q?feat:=20=E5=8E=BB=E6=8E=89=E9=9D=9E?= =?UTF-8?q?=E7=9F=A9=E9=98=B5=E8=AE=BE=E8=AE=A1=E5=90=B8=E9=99=84=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Editor/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 9b4565389e..95865b38a7 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -28,7 +28,7 @@ class-name-active="de-drag-active" :class="{'gap_class':canvasStyleData.panel.gap==='yes'}" :snap="true" - :snap-tolerance="5" + :snap-tolerance="1" @refLineParams="getRefLineParams" > Date: Wed, 16 Jun 2021 09:56:57 +0800 Subject: [PATCH 08/15] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E8=8F=9C=E5=8D=95=E6=82=AC=E6=B5=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/topbar.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/styles/topbar.scss b/frontend/src/styles/topbar.scss index 2403e9733b..fbe970c7bf 100644 --- a/frontend/src/styles/topbar.scss +++ b/frontend/src/styles/topbar.scss @@ -32,12 +32,12 @@ .nav-item { display: inline-block; - .el-menu-item { + .el-menu-item:not(.is-active) { // color: rgb(191, 203, 217); color: $menuText; &:hover { - background-color: $subMenuHover !important; - color: $subMenuActiveText !important; + background-color: $menuHover !important; + // color: $subMenuActiveText !important; } &:focus { background-color: $subMenuHover !important; From 1881b60f71f6b277e7640de9239c29575d54b873 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 16 Jun 2021 10:09:50 +0800 Subject: [PATCH 09/15] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/i18n/messages_zh_CN.properties | 2 +- frontend/src/views/system/user/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 2fdd59a2ce..098dccf94e 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -197,7 +197,7 @@ authsource_configuration_is_null=认证源配置不能为空 删除菜单=删除菜单 删除角色=删除角色 删除连接=删除连接 -参数管理=参数管理 +显示设置=显示设置 数据源=数据源 数据源表单=数据源表单 数据集=数据集 diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index 2daea9bb59..2cfa1a189c 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -197,7 +197,7 @@ export default { searchConfig: { useQuickSearch: true, useComplexSearch: true, - quickPlaceholder: '按名称搜索', + quickPlaceholder: '按姓名搜索', components: [ { field: 'nick_name', label: '姓名', component: 'FuComplexInput' }, { From f28d2178157e26d3a0ba1d6b4dae13ad85259e13 Mon Sep 17 00:00:00 2001 From: maninhill <41712985+maninhill@users.noreply.github.com> Date: Wed, 16 Jun 2021 10:17:25 +0800 Subject: [PATCH 10/15] Update README.md --- README.md | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 25f1d1dff5..e8b8ef7600 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DataEase 开源数据可视化分析平台 +# DataEase - 人人可用的开源数据可视化分析工具 DataEase 是开源的数据可视化分析工具,帮助用户分析数据、改善业务。DataEase 支持丰富的数据源连接,能够通过拖拉拽方式快速制作图表,并可以方便的与他人分享。 @@ -15,6 +15,12 @@ TBD TBD +## 在线体验 + +- 环境地址: +- 用户名:demo +- 密码:P@ssw0rd123.. + ## 快速开始 仅需两步快速安装 DataEase: @@ -28,19 +34,12 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st 文档和演示视频: -- [完整文档](https://dataease.io/docs/) -- [演示视频] TBD +- [在线文档](https://dataease.io/docs/) +- [演示视频] -## 版本说明 +## 微信群 -DataEase 版本号命名规则为:v大版本.功能版本.Bug修复版本。比如: - -```text -v1.0.1 是 v1.0.0 之后的 Bug 修复版本; -v1.1.0 是 v1.0.0 之后的功能版本。 -``` - -像其它优秀开源项目一样,DataEase 将每月发布一个功能版本。 +![wechat-group](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png) ## 产品优势 @@ -180,25 +179,30 @@ v1.1.0 是 v1.0.0 之后的功能版本。 - ## 技术栈 -- 后端: [Spring Boot](https://www.tutorialspoint.com/spring_boot/spring_boot_introduction.htm) -- 前端: [Vue.js](https://vuejs.org/) -- 中间件: [MySQL](https://www.mysql.com/) -- 数据处理: [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/), [Apache Doris](https://doris.apache.org/) -- 基础设施: [Docker](https://www.docker.com/) +- 后端: [Spring Boot](https://www.tutorialspoint.com/spring_boot/spring_boot_introduction.htm); +- 前端: [Vue.js](https://vuejs.org/); +- 中间件: [MySQL](https://www.mysql.com/); +- 数据处理: [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/)、[Apache Doris](https://doris.apache.org/); +- 基础设施: [Docker](https://www.docker.com/)。 ## 致谢 -- [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/):DataEase 使用了 Kettle 进行数据处理工作 -- [Apache Doris](https://doris.apache.org/):DataEase 使用了 Apache Doris 进行快速的数据分析 -- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库 +- [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/):DataEase 使用了 Kettle 进行数据处理工作; +- [Apache Doris](https://doris.apache.org/):DataEase 使用了 Apache Doris 进行快速的数据分析; +- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库。 -## 微信群 +## 版本说明 -![wechat-group](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png) +DataEase 版本号命名规则为:v大版本.功能版本.Bug修复版本。比如: +```text +v1.0.1 是 v1.0.0 之后的 Bug 修复版本; +v1.1.0 是 v1.0.0 之后的功能版本。 +``` + +像其它优秀开源项目一样,DataEase 将每月发布一个功能版本。 ## License & Copyright @@ -209,5 +213,3 @@ Licensed under The GNU General Public License version 2 (GPLv2) (the "License") Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - From 1fd59163079adb573926648840f14b7234c06251 Mon Sep 17 00:00:00 2001 From: maninhill <41712985+maninhill@users.noreply.github.com> Date: Wed, 16 Jun 2021 10:21:51 +0800 Subject: [PATCH 11/15] Update README.md --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e8b8ef7600..d712eb8e5c 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ DataEase 是开源的数据可视化分析工具,帮助用户分析数据、 ## 功能架构 -TBD +![de-architecture](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/de-architecture.png) ## UI 展示 -TBD +![de-ui](https://dataease.oss-cn-hangzhou.aliyuncs.com/img/de-ui.png) ## 在线体验 @@ -32,10 +32,8 @@ TBD curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_start.sh | sh ``` -文档和演示视频: - - [在线文档](https://dataease.io/docs/) -- [演示视频] +- [演示视频](https://dataease.oss-cn-hangzhou.aliyuncs.com/video/de-v1-demo.mp4) ## 微信群 @@ -191,7 +189,7 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st - [Kettle](https://community.hitachivantara.com/s/article/data-integration-kettle/):DataEase 使用了 Kettle 进行数据处理工作; - [Apache Doris](https://doris.apache.org/):DataEase 使用了 Apache Doris 进行快速的数据分析; -- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库。 +- [Element](https://element.eleme.cn/):感谢 Element 提供的优秀组件库。 ## 版本说明 From d13c69496f56f5803c0a97cfd576942eb8adbd4c Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 16 Jun 2021 10:24:25 +0800 Subject: [PATCH 12/15] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0?= =?UTF-8?q?=E6=94=BE=E5=BC=80=E7=AE=A1=E7=90=86=E5=91=98=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=80=8C=E5=AF=BC=E8=87=B4=E7=9A=84=E6=9D=83=E9=99=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V5__auth.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/resources/db/migration/V5__auth.sql b/backend/src/main/resources/db/migration/V5__auth.sql index 0e386d03a1..8dbe7a63df 100644 --- a/backend/src/main/resources/db/migration/V5__auth.sql +++ b/backend/src/main/resources/db/migration/V5__auth.sql @@ -400,7 +400,7 @@ SELECT GROUP BY sys_auth.auth_source_type, sys_auth.auth_source - having (sum( sys_auth_detail.privilege_value )> 0 or 1 = ( SELECT is_admin FROM sys_user WHERE user_id = 1 ))) temp; + having (sum( sys_auth_detail.privilege_value )> 0 or 1 = ( SELECT is_admin FROM sys_user WHERE user_id = userId ))) temp; select GROUP_CONCAT(id) into oTempAllIds from (select GET_V_AUTH_MODEL_WITH_PARENT ( oTempLeafIds ,modelType) cids) t, v_auth_model where v_auth_model.model_type=modelType and FIND_IN_SET(v_auth_model.id,cids); From 93d380673ebe3992d5178bcbb9d9f9592e308a72 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 16 Jun 2021 10:38:33 +0800 Subject: [PATCH 13/15] =?UTF-8?q?feat(fix):=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=88=86=E9=A1=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/service/dataset/DataSetTableService.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index c0355a9e63..4014d37c96 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -274,9 +274,8 @@ public class DataSetTableService { e.printStackTrace(); } try { -// datasourceRequest.setQuery(qp.createQueryCountSQL(table)); -// dataSetPreviewPage.setTotal(Integer.valueOf(datasourceProvider.getData(datasourceRequest).get(0)[0])); - dataSetPreviewPage.setTotal(Integer.parseInt(dataSetTableRequest.getRow())); + datasourceRequest.setQuery(qp.createQuerySQL(table, fields) + " LIMIT 0," + dataSetTableRequest.getRow()); + dataSetPreviewPage.setTotal(datasourceProvider.getData(datasourceRequest).size()); } catch (Exception e) { e.printStackTrace(); } @@ -298,9 +297,8 @@ public class DataSetTableService { e.printStackTrace(); } try { -// datasourceRequest.setQuery(qp.createQueryCountSQLAsTmp(sql)); -// dataSetPreviewPage.setTotal(Integer.valueOf(datasourceProvider.getData(datasourceRequest).get(0)[0])); - dataSetPreviewPage.setTotal(Integer.parseInt(dataSetTableRequest.getRow())); + datasourceRequest.setQuery(qp.createQuerySQLAsTmp(sql, fields) + " LIMIT 0," + dataSetTableRequest.getRow()); + dataSetPreviewPage.setTotal(datasourceProvider.getData(datasourceRequest).size()); } catch (Exception e) { e.printStackTrace(); } From 4dff1f4d9661353cd5a8543e922d459b66324b2d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 16 Jun 2021 11:09:20 +0800 Subject: [PATCH 14/15] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D'=E4=B8=8D?= =?UTF-8?q?=E5=8C=85=E5=90=AB'=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/base/mapper/ext/query/GridExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/query/GridExample.java b/backend/src/main/java/io/dataease/base/mapper/ext/query/GridExample.java index f241e39e1d..46482b7f48 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/query/GridExample.java +++ b/backend/src/main/java/io/dataease/base/mapper/ext/query/GridExample.java @@ -136,7 +136,7 @@ public class GridExample { addCriterion(field+" like ", "%"+value+"%", field); break; case "not like": - addCriterion(field+" not like ", value, field); + addCriterion(field+" not like ", "%"+value+"%", field); break; case "in": List invalues = (List)value; From b622ee8ae78630db1a3cac2159cc89915f1ec78a Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 16 Jun 2021 14:09:37 +0800 Subject: [PATCH 15/15] =?UTF-8?q?feat(fix):=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/job/sechedule/ScheduleManager.java | 12 ++++++++---- .../java/io/dataease/listener/AppStartListener.java | 8 +++++++- .../java/io/dataease/service/ScheduleService.java | 4 ++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java index e16cfc3aa8..7c29437eca 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java +++ b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java @@ -2,13 +2,13 @@ package io.dataease.job.sechedule; import io.dataease.commons.utils.LogUtil; import org.quartz.*; -import org.quartz.impl.triggers.CronTriggerImpl; import org.springframework.stereotype.Component; import javax.annotation.Resource; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.*; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @Component public class ScheduleManager { @@ -84,6 +84,8 @@ public class ScheduleManager { } else { triggerBuilder.endAt(endTime); } + } else { + triggerBuilder.endAt(null); } triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron)); @@ -167,6 +169,8 @@ public class ScheduleManager { } else { triggerBuilder.endAt(endTime); } + } else { + triggerBuilder.endAt(null); } triggerBuilder.withSchedule(CronScheduleBuilder.cronSchedule(cron));// 触发器时间设定 diff --git a/backend/src/main/java/io/dataease/listener/AppStartListener.java b/backend/src/main/java/io/dataease/listener/AppStartListener.java index a2224eaaea..1aa50873bf 100644 --- a/backend/src/main/java/io/dataease/listener/AppStartListener.java +++ b/backend/src/main/java/io/dataease/listener/AppStartListener.java @@ -26,7 +26,13 @@ public class AppStartListener implements ApplicationListener list = dataSetTableTaskService.list(new DatasetTableTask()); for (DatasetTableTask task : list) { try { - scheduleService.addSchedule(task); + if (task.getEndTime() != null && task.getEndTime() > 0) { + if (task.getEndTime() > System.currentTimeMillis()) { + scheduleService.addSchedule(task); + } + } else { + scheduleService.addSchedule(task); + } } catch (Exception e) { e.printStackTrace(); } diff --git a/backend/src/main/java/io/dataease/service/ScheduleService.java b/backend/src/main/java/io/dataease/service/ScheduleService.java index 9efef3d772..af00535edf 100644 --- a/backend/src/main/java/io/dataease/service/ScheduleService.java +++ b/backend/src/main/java/io/dataease/service/ScheduleService.java @@ -37,6 +37,10 @@ public class ScheduleService { // if (endTime.before(new Date())) { // return; // } + if (endTime.before(new Date())) { + deleteSchedule(datasetTableTask); + return; + } } scheduleManager.addOrUpdateCronJob(new JobKey(datasetTableTask.getId(), datasetTableTask.getTableId()),