From bac71beec3eb5a2a1c6a7a7bd4690045b9669395 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 23 Jun 2021 11:02:48 +0800 Subject: [PATCH 1/5] ehcache --- .gitignore | 1 + pom.xml | 2 +- report-core/pom.xml | 19 ++- .../business/cache/ReportCacheHelper.java | 141 ++++++++++++++++++ .../config/BusinessAutoConfiguration.java | 24 ++- .../src/main/resources/bootstrap-dev.yml | 12 +- report-core/src/main/resources/ehcache.xml | 36 +++++ report-core/src/main/resources/logback.xml | 4 +- 8 files changed, 228 insertions(+), 11 deletions(-) create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java create mode 100644 report-core/src/main/resources/ehcache.xml diff --git a/.gitignore b/.gitignore index ff96ea4d..80a24dc6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ target **/*.log dist logs +cache diff --git a/pom.xml b/pom.xml index 4dc13d53..798ce214 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT diff --git a/report-core/pom.xml b/report-core/pom.xml index 372f3517..9afe842f 100644 --- a/report-core/pom.xml +++ b/report-core/pom.xml @@ -16,7 +16,7 @@ com.anjiplus.template.gaea template-gaea-common - + @@ -25,7 +25,11 @@ - + + org.springframework.boot + spring-boot-starter-data-redis + + @@ -49,6 +53,17 @@ test + + org.springframework.boot + spring-boot-starter-cache + + + + net.sf.ehcache + ehcache + 2.10.6 + + diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java new file mode 100644 index 00000000..5010945c --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java @@ -0,0 +1,141 @@ +package com.anjiplus.template.gaea.business.cache; + + +import com.anji.plus.gaea.cache.CacheHelper; +import com.google.common.collect.Maps; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.Cache; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { + + @Autowired + private Cache cache; + + @Override + public String stringGet(String key) { + Cache.ValueWrapper valueWrapper = cache.get(key); + if (valueWrapper != null) { + return (String)valueWrapper.get(); + } + return CacheHelper.super.stringGet(key); + } + + @Override + public Boolean setIfAbsent(String key, String value) { + cache.putIfAbsent(key, value); + return true; + } + + + @Override + public boolean exist(String key) { + return cache.get(key)!=null; + } + + + @Override + public void stringSet(String key, String value) { + cache.put(key, value); + } + + @Override + public void stringSetExpire(String key, String value, long time, TimeUnit timeUnit) { + CacheHelper.super.stringSetExpire(key, value, time, timeUnit); + } + + @Override + public String regKey(String key) { + return CacheHelper.super.regKey(key); + } + + @Override + public void stringSetExpire(String key, String value, long seconds) { + CacheHelper.super.stringSetExpire(key, value, seconds); + } + + @Override + public Map hashGet(String key) { + Cache.ValueWrapper t = cache.get(key); + if (t != null) { + return (Map) t.get(); + } + return Maps.newHashMap(); + } + + @Override + public String hashGetString(String key, String hashKey) { + Map stringStringMap = hashGet(key); + return stringStringMap.get(hashKey); + } + + @Override + public void hashDel(String key, String hashKey) { + Map stringStringMap = hashGet(key); + stringStringMap.remove(hashKey); + } + + @Override + public void hashBatchDel(String key, Set hashKeys) { + Map stringStringMap = hashGet(key); + hashKeys.forEach(stringStringMap::remove); + } + + @Override + public boolean hashExist(String key, String hashKey) { + if (exist(key)) { + Map map = hashGet(key); + return map.containsKey(hashKey); + } + return false; + } + + @Override + public boolean hashAnyExist(String key, String[] hashKeys) { + return CacheHelper.super.hashAnyExist(key, hashKeys); + } + + @Override + public void hashSet(String key, String hashKey, String hashValue) { + Map map; + if (exist(key)) { + map = hashGet(key); + } else { + map = new HashMap<>(); + } + map.put(hashKey, hashValue); + hashSet(key, map); + } + + @Override + public void hashSet(String key, Map hash) { + cache.put(key, hash); + } + + @Override + public boolean delete(String key) { + cache.evict(key); + return true; + } + + @Override + public boolean delete(List keys) { + keys.forEach(this::delete); + return true; + } + + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + /*基于内存的本地缓存*/ + cache = (Cache)applicationContext.getBean("ehCacheCache"); + } +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java index 9c6751a1..ce4ade6f 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java @@ -1,8 +1,11 @@ package com.anjiplus.template.gaea.business.config; +import com.anji.plus.gaea.cache.CacheHelper; +import com.anjiplus.template.gaea.business.cache.ReportCacheHelper; import com.anjiplus.template.gaea.business.runner.ApplicationInitRunner; - import org.mybatis.spring.annotation.MapperScan; +import org.springframework.cache.ehcache.EhCacheCache; +import org.springframework.cache.ehcache.EhCacheCacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -26,4 +29,23 @@ public class BusinessAutoConfiguration { public ApplicationInitRunner applicationInitRunner() { return new ApplicationInitRunner(); } + + @Bean("gaeaCacheHelper") + public CacheHelper gaeaCacheHelper(){ + return new ReportCacheHelper(); + } + + @Bean + public EhCacheCache ehCacheCache() { + return (EhCacheCache) ehCacheCacheManager().getCache("reportCache"); + } + + /** + * 创建ehCacheCacheManager + */ + @Bean + public EhCacheCacheManager ehCacheCacheManager() { + + return new EhCacheCacheManager(); + } } diff --git a/report-core/src/main/resources/bootstrap-dev.yml b/report-core/src/main/resources/bootstrap-dev.yml index c5650e52..e606b533 100644 --- a/report-core/src/main/resources/bootstrap-dev.yml +++ b/report-core/src/main/resources/bootstrap-dev.yml @@ -19,11 +19,13 @@ spring: url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false username: root password: appuser@anji - redis: - host: 10.108.26.197 - port: 6379 - password: appuser@anji - database: 1 +# 禁用redis,使用ehcache +# redis: +# host: 10.108.26.197 +# port: 6379 +# password: appuser@anji +# database: 1 + flyway: baseline-on-migrate: true #数据库连接配置 diff --git a/report-core/src/main/resources/ehcache.xml b/report-core/src/main/resources/ehcache.xml new file mode 100644 index 00000000..2d8bb8d9 --- /dev/null +++ b/report-core/src/main/resources/ehcache.xml @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/report-core/src/main/resources/logback.xml b/report-core/src/main/resources/logback.xml index b6752c24..b3488525 100644 --- a/report-core/src/main/resources/logback.xml +++ b/report-core/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + @@ -34,4 +34,4 @@ - \ No newline at end of file + From c51a993b178b690131793d0a5e15876100baa793 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 23 Jun 2021 13:05:31 +0800 Subject: [PATCH 2/5] delete docs --- docs/README.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 18080727..00000000 --- a/docs/README.md +++ /dev/null @@ -1 +0,0 @@ -## 文档 From 258f4e628ec7f73c0131128b4c71eda25dcc51fb Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 23 Jun 2021 14:17:22 +0800 Subject: [PATCH 3/5] modules --- doc/docs/.vuepress/config.js | 55 +++++++++++++++---- .../controller/ReportDashboardController.java | 8 +-- .../dashboard/controller/dto/ChartDto.java | 2 +- .../controller/dto/ReportDashboardDto.java | 6 +- .../dto/ReportDashboardObjectDto.java | 4 +- .../param/ReportDashboardParam.java | 4 +- .../dashboard/dao/ReportDashboardMapper.java | 6 +- .../dashboard/dao/entity/ReportDashboard.java | 2 +- .../dashboard/service/ChartStrategy.java | 4 +- .../service/ReportDashboardService.java | 10 ++-- .../service/impl/BarChartServiceImpl.java | 8 +-- .../service/impl/BarLineChartServiceImpl.java | 9 +-- .../service/impl/GaugeChartServiceImpl.java | 6 +- .../service/impl/PieChartServiceImpl.java | 6 +- .../impl/ReportDashboardServiceImpl.java | 32 +++++------ .../{data => }/dashboard/util/DateUtil.java | 2 +- .../dto/ReportDashboardWidgetDto.java | 2 +- .../dto/ReportDashboardWidgetValueDto.java | 2 +- .../param/ReportDashboardWidgetParam.java | 4 +- .../dao/ReportDashboardWidgetMapper.java | 6 +- .../dao/entity/ReportDashboardWidget.java | 2 +- .../service/ReportDashboardWidgetService.java | 8 +-- .../ReportDashboardWidgetServiceImpl.java | 10 ++-- .../data/report/service/ReportService.java | 17 ------ .../dataSet/controller/DataSetController.java | 12 ++-- .../dataSet/controller/dto/DataSetDto.java | 8 +-- .../controller/dto/OriginalDataDto.java | 2 +- .../controller/param/DataSetParam.java | 4 +- .../param/DataSetTestTransformParam.java | 8 +-- .../{data => }/dataSet/dao/DataSetMapper.java | 6 +- .../dataSet/dao/entity/DataSet.java | 2 +- .../dataSet/service/DataSetService.java | 10 ++-- .../service/impl/DataSetServiceImpl.java | 30 +++++----- .../controller/DataSetParamController.java | 15 +++-- .../controller/dto/DataSetParamDto.java | 4 +- .../controller/param/DataSetParamParam.java | 4 +- .../param/DataSetParamValidationParam.java | 2 +- .../dataSetParam/dao/DataSetParamMapper.java | 6 +- .../dataSetParam/dao/entity/DataSetParam.java | 2 +- .../service/DataSetParamService.java | 11 ++-- .../service/impl/DataSetParamServiceImpl.java | 12 ++-- .../util/ParamsResolverHelper.java | 2 +- .../DataSetTransformController.java | 12 ++-- .../controller/dto/DataSetTransformDto.java | 4 +- .../param/DataSetTransformParam.java | 4 +- .../dao/DataSetTransformMapper.java | 6 +- .../dao/entity/DataSetTransform.java | 2 +- .../service/DataSetTransformService.java | 10 ++-- .../service/TransformStrategy.java | 4 +- .../impl/DataSetTransformServiceImpl.java | 14 ++--- .../impl/DictTransformServiceImpl.java | 6 +- .../service/impl/JsTransformServiceImpl.java | 6 +- .../dataSource/config/HttpClientConfig.java | 2 +- .../config/HttpClientPoolConfig.java | 2 +- .../controller/DataSourceController.java | 14 ++--- .../controller/dto/DataSourceDto.java | 4 +- .../controller/param/ConnectionParam.java | 2 +- .../controller/param/DataSourceParam.java | 4 +- .../dataSource/dao/DataSourceMapper.java | 6 +- .../dataSource/dao/entity/DataSource.java | 2 +- .../dataSource/pool/api/IConfig.java | 2 +- .../pool/api/IDataSourceConfig.java | 2 +- .../dataSource/pool/api/ILifeCycle.java | 2 +- .../pool/api/IPooledDataSourceConfig.java | 4 +- .../pool/connection/IPooledConnection.java | 4 +- .../pool/connection/PooledConnection.java | 6 +- .../pool/constant/JdbcConstants.java | 2 +- .../dataSource/pool/constant/PooledConst.java | 2 +- .../datasource/AbstractDataSourceConfig.java | 2 +- .../AbstractPooledDataSourceConfig.java | 8 +-- .../datasource/DataSourceConfigAdaptor.java | 4 +- .../pool/datasource/PooledDataSource.java | 10 ++-- .../pool/datasource/UnPooledDataSource.java | 4 +- .../pool/exception/JdbcPoolException.java | 2 +- .../pool/util/DataSourceHandleUtil.java | 2 +- .../dataSource/pool/util/DriverClassUtil.java | 2 +- .../dataSource/pool/util/JdbcUtil.java | 8 +-- .../dataSource/service/DataSourceService.java | 14 ++--- .../service/impl/DataSourceServiceImpl.java | 21 ++++--- .../report/constant/ExpConstant.java | 2 +- .../report/controller/ReportController.java | 10 ++-- .../report/controller/dto/ReportDto.java | 2 +- .../report/controller/param/ReportParam.java | 2 +- .../{data => }/report/dao/ReportMapper.java | 4 +- .../{data => }/report/dao/entity/Report.java | 2 +- .../modules/report/service/ReportService.java | 17 ++++++ .../service/impl/ReportServiceImpl.java | 14 ++--- .../controller/ReportExcelController.java | 10 ++-- .../controller/dto/ReportExcelDto.java | 2 +- .../controller/param/ReportExcelParam.java | 2 +- .../reportexcel/dao/ReportExcelMapper.java | 4 +- .../reportexcel/dao/entity/ReportExcel.java | 2 +- .../service/ReportExcelService.java | 8 +-- .../service/impl/ReportExcelServiceImpl.java | 16 +++--- .../reportexcel/util/ReportUtil.java | 12 ++-- .../main/resources/mapper/DataSetMapper.xml | 6 +- .../resources/mapper/DataSetParamMapper.xml | 6 +- .../mapper/DataSetTransformMapper.xml | 6 +- .../resources/mapper/DataSourceMapper.xml | 6 +- .../mapper/ReportDashboardMapper.xml | 6 +- .../mapper/ReportDashboardWidgetMapper.xml | 4 +- .../resources/mapper/ReportExcelMapper.xml | 4 +- .../main/resources/mapper/ReportMapper.xml | 4 +- 103 files changed, 367 insertions(+), 344 deletions(-) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/controller/ReportDashboardController.java (81%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/controller/dto/ChartDto.java (90%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/controller/dto/ReportDashboardDto.java (84%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/controller/dto/ReportDashboardObjectDto.java (70%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/controller/param/ReportDashboardParam.java (82%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/dao/ReportDashboardMapper.java (61%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/dao/entity/ReportDashboard.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/ChartStrategy.java (70%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/ReportDashboardService.java (57%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/impl/BarChartServiceImpl.java (84%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/impl/BarLineChartServiceImpl.java (88%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/impl/GaugeChartServiceImpl.java (73%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/impl/PieChartServiceImpl.java (77%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/service/impl/ReportDashboardServiceImpl.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboard/util/DateUtil.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java (81%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java (90%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/controller/param/ReportDashboardWidgetParam.java (82%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/dao/ReportDashboardWidgetMapper.java (61%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/dao/entity/ReportDashboardWidget.java (93%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/service/ReportDashboardWidgetService.java (57%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dashboardwidget/service/impl/ReportDashboardWidgetServiceImpl.java (66%) delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/report/service/ReportService.java rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/controller/DataSetController.java (90%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/controller/dto/DataSetDto.java (80%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/controller/dto/OriginalDataDto.java (87%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/controller/param/DataSetParam.java (88%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/controller/param/DataSetTestTransformParam.java (69%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/dao/DataSetMapper.java (62%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/dao/entity/DataSet.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/service/DataSetService.java (73%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSet/service/impl/DataSetServiceImpl.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/controller/DataSetParamController.java (71%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/controller/dto/DataSetParamDto.java (92%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/controller/param/DataSetParamParam.java (77%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/controller/param/DataSetParamValidationParam.java (84%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/dao/DataSetParamMapper.java (61%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/dao/entity/DataSetParam.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/service/DataSetParamService.java (69%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/service/impl/DataSetParamServiceImpl.java (87%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetParam/util/ParamsResolverHelper.java (93%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/controller/DataSetTransformController.java (68%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/controller/dto/DataSetTransformDto.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/controller/param/DataSetTransformParam.java (77%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/dao/DataSetTransformMapper.java (60%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/dao/entity/DataSetTransform.java (92%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/service/DataSetTransformService.java (52%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/service/TransformStrategy.java (68%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/service/impl/DataSetTransformServiceImpl.java (78%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/service/impl/DictTransformServiceImpl.java (82%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSetTransform/service/impl/JsTransformServiceImpl.java (85%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/config/HttpClientConfig.java (99%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/config/HttpClientPoolConfig.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/controller/DataSourceController.java (74%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/controller/dto/DataSourceDto.java (95%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/controller/param/ConnectionParam.java (90%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/controller/param/DataSourceParam.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/dao/DataSourceMapper.java (61%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/dao/entity/DataSource.java (95%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/api/IConfig.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/api/IDataSourceConfig.java (67%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/api/ILifeCycle.java (75%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/api/IPooledDataSourceConfig.java (92%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/connection/IPooledConnection.java (83%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/connection/PooledConnection.java (97%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/constant/JdbcConstants.java (98%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/constant/PooledConst.java (94%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/datasource/AbstractDataSourceConfig.java (92%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/datasource/DataSourceConfigAdaptor.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/datasource/PooledDataSource.java (93%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/datasource/UnPooledDataSource.java (79%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/exception/JdbcPoolException.java (87%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/util/DataSourceHandleUtil.java (63%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/util/DriverClassUtil.java (97%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/pool/util/JdbcUtil.java (88%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/service/DataSourceService.java (60%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/dataSource/service/impl/DataSourceServiceImpl.java (93%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/constant/ExpConstant.java (87%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/controller/ReportController.java (78%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/controller/dto/ReportDto.java (90%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/controller/param/ReportParam.java (87%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/dao/ReportMapper.java (55%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/dao/entity/Report.java (93%) create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/ReportService.java rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/report/service/impl/ReportServiceImpl.java (62%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/controller/ReportExcelController.java (86%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/controller/dto/ReportExcelDto.java (89%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/controller/param/ReportExcelParam.java (73%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/dao/ReportExcelMapper.java (52%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/dao/entity/ReportExcel.java (91%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/service/ReportExcelService.java (65%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/service/impl/ReportExcelServiceImpl.java (88%) rename report-core/src/main/java/com/anjiplus/template/gaea/business/modules/{data => }/reportexcel/util/ReportUtil.java (99%) diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js index c3e920ff..b6deb7e4 100644 --- a/doc/docs/.vuepress/config.js +++ b/doc/docs/.vuepress/config.js @@ -1,14 +1,45 @@ module.exports = { - base: '/doc/', - title: '大屏设计', - description: '使用拖拽快速生成动态大屏报表', - dest: 'dist', - lastUpdated: 'Last Updated', - theme: '', - themeConfig: { - logo: '/logo.png', - smoothScroll: true, - sidebarDepth: 2, - - } + base: '/doc/', + title: '大屏设计', + description: '使用拖拽快速生成动态大屏报表', + dest: 'dist', + lastUpdated: 'Last Updated', + theme: '', + themeConfig: { + logo: '/logo.png', + smoothScroll: true, + sidebarDepth: 2, + nav: [ + {text: '首页', link: '/'}, + {text: '文档', link: '/guide/'}, + {text: 'GitHub', link: 'https://github.com/anji-plus/report'}, + {text: 'Gitee', link: 'https://gitee.com/anji-plus/report'}, + ], + sidebar: { + '/guide/': [ + { + title: '文档', + collapsable: false, + children: [ + {title: '介绍', path: '/guide/'}, + {title: '快速了解', path: '/guide/quickly'}, + {title: '项目介绍', path: '/guide/productintro'}, + {title: '系统运行', path: '/guide/deploy'}, + {title: '开发手册', path: '/guide/devdoc'} + ] + }, + { + title: '盖亚底盘', + collapsable: false, + children: [] + }, + { + title: '其他', + collapsable: false, + children: [ + {title: '常见问题', path: '/guide/question'} + ] + }], + } + } } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/ReportDashboardController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java similarity index 81% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/ReportDashboardController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java index a1754871..e586c7a0 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/ReportDashboardController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/ReportDashboardController.java @@ -1,12 +1,12 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.controller; +package com.anjiplus.template.gaea.business.modules.dashboard.controller; import com.anji.plus.gaea.annotation.Permission; import com.anji.plus.gaea.annotation.log.GaeaAuditLog; import com.anji.plus.gaea.bean.ResponseBean; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ReportDashboardService; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ChartDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ChartDto.java similarity index 90% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ChartDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ChartDto.java index b821eff3..d6b67f87 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ChartDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ChartDto.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto; +package com.anjiplus.template.gaea.business.modules.dashboard.controller.dto; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java similarity index 84% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java index b4ba347a..68123524 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto; +package com.anjiplus.template.gaea.business.modules.dashboard.controller.dto; import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetDto; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetDto; import lombok.Data; import java.io.Serializable; @@ -52,4 +52,4 @@ public class ReportDashboardDto extends GaeaBaseDTO implements Serializable { private List widgets; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardObjectDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardObjectDto.java similarity index 70% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardObjectDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardObjectDto.java index a74d3fa9..cc4ca08e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/dto/ReportDashboardObjectDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardObjectDto.java @@ -1,7 +1,7 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto; +package com.anjiplus.template.gaea.business.modules.dashboard.controller.dto; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetDto; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetDto; import lombok.Data; import java.io.Serializable; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/param/ReportDashboardParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/param/ReportDashboardParam.java similarity index 82% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/param/ReportDashboardParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/param/ReportDashboardParam.java index f2045fcd..d044b966 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/controller/param/ReportDashboardParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/param/ReportDashboardParam.java @@ -1,5 +1,5 @@ /**/ -package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.param; +package com.anjiplus.template.gaea.business.modules.dashboard.controller.param; import lombok.Data; import java.io.Serializable; @@ -17,4 +17,4 @@ import java.util.List; **/ @Data public class ReportDashboardParam extends PageParam implements Serializable{ -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/ReportDashboardMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/ReportDashboardMapper.java similarity index 61% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/ReportDashboardMapper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/ReportDashboardMapper.java index 9c339a02..173e822b 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/ReportDashboardMapper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/ReportDashboardMapper.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.dao; +package com.anjiplus.template.gaea.business.modules.dashboard.dao; import org.apache.ibatis.annotations.Mapper; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard; +import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard; /** * ReportDashboard Mapper @@ -13,4 +13,4 @@ import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.Rep @Mapper public interface ReportDashboardMapper extends GaeaBaseMapper { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/entity/ReportDashboard.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/entity/ReportDashboard.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java index 6be5bad3..bf89396e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/dao/entity/ReportDashboard.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity; +package com.anjiplus.template.gaea.business.modules.dashboard.dao.entity; import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ChartStrategy.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ChartStrategy.java similarity index 70% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ChartStrategy.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ChartStrategy.java index aaa79d0c..ccaa4b04 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ChartStrategy.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ChartStrategy.java @@ -1,7 +1,7 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service; +package com.anjiplus.template.gaea.business.modules.dashboard.service; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; import java.util.List; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ReportDashboardService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ReportDashboardService.java similarity index 57% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ReportDashboardService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ReportDashboardService.java index 2a5d62c6..508bfeed 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/ReportDashboardService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/ReportDashboardService.java @@ -1,11 +1,11 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service; +package com.anjiplus.template.gaea.business.modules.dashboard.service; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.param.ReportDashboardParam; -import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.param.ReportDashboardParam; +import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard; /** * @desc ReportDashboard 大屏设计服务接口 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarChartServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarChartServiceImpl.java similarity index 84% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarChartServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarChartServiceImpl.java index 780d17d3..7874721d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarChartServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarChartServiceImpl.java @@ -1,12 +1,10 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl; +package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy; import org.springframework.stereotype.Component; -import java.util.ArrayList; import java.util.List; /** diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarLineChartServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarLineChartServiceImpl.java similarity index 88% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarLineChartServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarLineChartServiceImpl.java index 362abb0e..032620cf 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/BarLineChartServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/BarLineChartServiceImpl.java @@ -1,14 +1,11 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl; +package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** * 折柱图 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/GaugeChartServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/GaugeChartServiceImpl.java similarity index 73% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/GaugeChartServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/GaugeChartServiceImpl.java index c9d75a05..89fbe6f0 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/GaugeChartServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/GaugeChartServiceImpl.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl; +package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy; import org.springframework.stereotype.Component; import java.util.List; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/PieChartServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/PieChartServiceImpl.java similarity index 77% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/PieChartServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/PieChartServiceImpl.java index e19e0055..5f1ffbf3 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/PieChartServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/PieChartServiceImpl.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl; +package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy; import org.springframework.stereotype.Component; import java.util.List; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/ReportDashboardServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/ReportDashboardServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java index cfc1bd56..c9f4999e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/service/impl/ReportDashboardServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl; +package com.anjiplus.template.gaea.business.modules.dashboard.service.impl; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; @@ -7,21 +7,21 @@ import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anji.plus.gaea.utils.GaeaAssert; import com.anji.plus.gaea.utils.GaeaBeanUtils; import com.anjiplus.template.gaea.business.code.ResponseCode; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto; -import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.ReportDashboardMapper; -import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy; -import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ReportDashboardService; -import com.anjiplus.template.gaea.business.modules.data.dashboard.util.DateUtil; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetDto; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetValueDto; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.service.ReportDashboardWidgetService; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.OriginalDataDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.service.DataSetService; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ChartDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardDto; +import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto; +import com.anjiplus.template.gaea.business.modules.dashboard.dao.ReportDashboardMapper; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy; +import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService; +import com.anjiplus.template.gaea.business.modules.dashboard.util.DateUtil; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetDto; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetValueDto; +import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity.ReportDashboardWidget; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.service.ReportDashboardWidgetService; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto; +import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/util/DateUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/util/DateUtil.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/util/DateUtil.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/util/DateUtil.java index da8e3f4b..3f8403bf 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboard/util/DateUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/util/DateUtil.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboard.util; +package com.anjiplus.template.gaea.business.modules.dashboard.util; import java.text.ParseException; import java.text.SimpleDateFormat; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java similarity index 81% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java index 43965a43..ed976930 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java similarity index 90% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java index c7a5ded1..805368be 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto; import com.alibaba.fastjson.JSONObject; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/param/ReportDashboardWidgetParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/param/ReportDashboardWidgetParam.java similarity index 82% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/param/ReportDashboardWidgetParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/param/ReportDashboardWidgetParam.java index 8e6073c5..09f54bff 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/controller/param/ReportDashboardWidgetParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/param/ReportDashboardWidgetParam.java @@ -1,5 +1,5 @@ /**/ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.param; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.param; import lombok.Data; import java.io.Serializable; @@ -17,4 +17,4 @@ import java.util.List; **/ @Data public class ReportDashboardWidgetParam extends PageParam implements Serializable{ -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/ReportDashboardWidgetMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/ReportDashboardWidgetMapper.java similarity index 61% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/ReportDashboardWidgetMapper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/ReportDashboardWidgetMapper.java index cfa0d532..2570c7fd 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/ReportDashboardWidgetMapper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/ReportDashboardWidgetMapper.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.dao; import org.apache.ibatis.annotations.Mapper; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity.ReportDashboardWidget; /** * ReportDashboardWidget Mapper @@ -13,4 +13,4 @@ import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.enti @Mapper public interface ReportDashboardWidgetMapper extends GaeaBaseMapper { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/entity/ReportDashboardWidget.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java similarity index 93% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/entity/ReportDashboardWidget.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java index 2214cb40..a0161db5 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/dao/entity/ReportDashboardWidget.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/service/ReportDashboardWidgetService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/service/ReportDashboardWidgetService.java similarity index 57% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/service/ReportDashboardWidgetService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/service/ReportDashboardWidgetService.java index 690d5830..367030c8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dashboardwidget/service/ReportDashboardWidgetService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/service/ReportDashboardWidgetService.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.service; +package com.anjiplus.template.gaea.business.modules.dashboardwidget.service; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget; -import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.param.ReportDashboardWidgetParam; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.param.ReportDashboardWidgetParam; +import com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity.ReportDashboardWidget; import com.anji.plus.gaea.curd.service.GaeaBaseService; /** @@ -18,4 +18,4 @@ public interface ReportDashboardWidgetService extends GaeaBaseService { - - void delReport(ReportDto reportDto); -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/DataSetController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/DataSetController.java similarity index 90% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/DataSetController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/DataSetController.java index e5a0e58a..303ea854 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/DataSetController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/DataSetController.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.controller; +package com.anjiplus.template.gaea.business.modules.dataSet.controller; import com.anji.plus.gaea.annotation.AccessKey; import com.anji.plus.gaea.annotation.Permission; @@ -9,11 +9,11 @@ import com.anji.plus.gaea.curd.controller.GaeaBaseController; import com.anji.plus.gaea.curd.service.GaeaBaseService; import com.anji.plus.gaea.holder.UserContentHolder; import com.anji.plus.gaea.utils.GaeaUtils; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param.DataSetParam; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param.DataSetTestTransformParam; -import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet; -import com.anjiplus.template.gaea.business.modules.data.dataSet.service.DataSetService; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.param.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.param.DataSetTestTransformParam; +import com.anjiplus.template.gaea.business.modules.dataSet.dao.entity.DataSet; +import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService; import io.swagger.annotations.Api; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/DataSetDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/DataSetDto.java similarity index 80% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/DataSetDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/DataSetDto.java index acef9c28..75eb3dcd 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/DataSetDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/DataSetDto.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto; +package com.anjiplus.template.gaea.business.modules.dataSet.controller.dto; import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; import lombok.Data; import java.io.Serializable; @@ -55,4 +55,4 @@ public class DataSetDto extends GaeaBaseDTO implements Serializable { private Set setParamList; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/OriginalDataDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/OriginalDataDto.java similarity index 87% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/OriginalDataDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/OriginalDataDto.java index 12b4aad0..82e3926c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/dto/OriginalDataDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/dto/OriginalDataDto.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto; +package com.anjiplus.template.gaea.business.modules.dataSet.controller.dto; import com.alibaba.fastjson.JSONObject; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetParam.java similarity index 88% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetParam.java index f96ecf93..f093c599 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetParam.java @@ -1,5 +1,5 @@ /**/ -package com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param; +package com.anjiplus.template.gaea.business.modules.dataSet.controller.param; import com.anji.plus.gaea.annotation.Query; import com.anji.plus.gaea.constant.QueryEnum; @@ -27,4 +27,4 @@ public class DataSetParam extends PageParam implements Serializable{ /** 数据源编码 */ @Query(QueryEnum.EQ) private String sourceCode; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetTestTransformParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetTestTransformParam.java similarity index 69% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetTestTransformParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetTestTransformParam.java index 33739099..166dc836 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/controller/param/DataSetTestTransformParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/controller/param/DataSetTestTransformParam.java @@ -1,8 +1,8 @@ /**/ -package com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param; +package com.anjiplus.template.gaea.business.modules.dataSet.controller.param; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -31,4 +31,4 @@ public class DataSetTestTransformParam implements Serializable{ /** 数据转换集合 */ private List dataSetTransformDtoList; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/DataSetMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/DataSetMapper.java similarity index 62% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/DataSetMapper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/DataSetMapper.java index fe6a9ab9..334aebfa 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/DataSetMapper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/DataSetMapper.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.dao; +package com.anjiplus.template.gaea.business.modules.dataSet.dao; import org.apache.ibatis.annotations.Mapper; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet; +import com.anjiplus.template.gaea.business.modules.dataSet.dao.entity.DataSet; /** * DataSet Mapper @@ -13,4 +13,4 @@ import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataS @Mapper public interface DataSetMapper extends GaeaBaseMapper { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/entity/DataSet.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/entity/DataSet.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/entity/DataSet.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/entity/DataSet.java index fec167bd..475a96e9 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/dao/entity/DataSet.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/dao/entity/DataSet.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity; +package com.anjiplus.template.gaea.business.modules.dataSet.dao.entity; import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/DataSetService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/DataSetService.java similarity index 73% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/DataSetService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/DataSetService.java index b9dd4dd3..568de6da 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/DataSetService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/DataSetService.java @@ -1,11 +1,11 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.service; +package com.anjiplus.template.gaea.business.modules.dataSet.service; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.OriginalDataDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.param.DataSetParam; -import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.param.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSet.dao.entity.DataSet; import java.util.List; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/impl/DataSetServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/impl/DataSetServiceImpl.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/impl/DataSetServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/impl/DataSetServiceImpl.java index 3b536c51..6502db3b 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSet/service/impl/DataSetServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSet/service/impl/DataSetServiceImpl.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSet.service.impl; +package com.anjiplus.template.gaea.business.modules.dataSet.service.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -8,20 +8,20 @@ import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anji.plus.gaea.utils.GaeaBeanUtils; import com.anjiplus.template.gaea.business.code.ResponseCode; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.OriginalDataDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.DataSetMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSet.dao.entity.DataSet; -import com.anjiplus.template.gaea.business.modules.data.dataSet.service.DataSetService; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity.DataSetTransform; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.DataSetTransformService; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.dto.DataSourceDto; -import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.DataSource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.service.DataSourceService; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSet.dao.DataSetMapper; +import com.anjiplus.template.gaea.business.modules.dataSet.dao.entity.DataSet; +import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.service.DataSetParamService; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity.DataSetTransform; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.DataSetTransformService; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.dto.DataSourceDto; +import com.anjiplus.template.gaea.business.modules.dataSource.dao.entity.DataSource; +import com.anjiplus.template.gaea.business.modules.dataSource.service.DataSourceService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/controller/DataSetParamController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/controller/DataSetParamController.java similarity index 71% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/controller/DataSetParamController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/controller/DataSetParamController.java index dbefff3b..984ce30e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/controller/DataSetParamController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/controller/DataSetParamController.java @@ -1,15 +1,14 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller; +package com.anjiplus.template.gaea.business.modules.dataSetParam.controller; import com.anji.plus.gaea.bean.ResponseBean; import com.anji.plus.gaea.curd.controller.GaeaBaseController; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.param.DataSetParamParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.param.DataSetParamValidationParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param.ConnectionParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.param.DataSetParamParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.param.DataSetParamValidationParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.service.DataSetParamService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; @@ -59,4 +58,4 @@ public class DataSetParamController extends GaeaBaseController { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/dao/entity/DataSetParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/dao/entity/DataSetParam.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/dao/entity/DataSetParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/dao/entity/DataSetParam.java index 758a01ea..5dad6c77 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/dao/entity/DataSetParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/dao/entity/DataSetParam.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity; +package com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/DataSetParamService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/DataSetParamService.java similarity index 69% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/DataSetParamService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/DataSetParamService.java index 6ae3a2fb..2942228d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/DataSetParamService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/DataSetParamService.java @@ -1,11 +1,10 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetParam.service; +package com.anjiplus.template.gaea.business.modules.dataSetParam.service; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.param.DataSetParamParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.param.DataSetParamParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity.DataSetParam; import java.util.List; import java.util.Map; @@ -49,4 +48,4 @@ public interface DataSetParamService extends GaeaBaseService dataSetParamDtoList, Map contextData); -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/impl/DataSetParamServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/impl/DataSetParamServiceImpl.java similarity index 87% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/impl/DataSetParamServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/impl/DataSetParamServiceImpl.java index e85e34c6..2a351563 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/service/impl/DataSetParamServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/service/impl/DataSetParamServiceImpl.java @@ -1,13 +1,13 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.impl; +package com.anjiplus.template.gaea.business.modules.dataSetParam.service.impl; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; import com.anji.plus.gaea.exception.BusinessExceptionBuilder; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.controller.dto.DataSetParamDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.DataSetParamMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.dao.entity.DataSetParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.service.DataSetParamService; -import com.anjiplus.template.gaea.business.modules.data.dataSetParam.util.ParamsResolverHelper; +import com.anjiplus.template.gaea.business.modules.dataSetParam.controller.dto.DataSetParamDto; +import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.DataSetParamMapper; +import com.anjiplus.template.gaea.business.modules.dataSetParam.dao.entity.DataSetParam; +import com.anjiplus.template.gaea.business.modules.dataSetParam.service.DataSetParamService; +import com.anjiplus.template.gaea.business.modules.dataSetParam.util.ParamsResolverHelper; import com.anjiplus.template.gaea.business.code.ResponseCode; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/util/ParamsResolverHelper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/util/ParamsResolverHelper.java similarity index 93% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/util/ParamsResolverHelper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/util/ParamsResolverHelper.java index e0d79bff..3b86d7cc 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetParam/util/ParamsResolverHelper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetParam/util/ParamsResolverHelper.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetParam.util; +package com.anjiplus.template.gaea.business.modules.dataSetParam.util; import org.springframework.util.PropertyPlaceholderHelper; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/controller/DataSetTransformController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/controller/DataSetTransformController.java similarity index 68% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/controller/DataSetTransformController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/controller/DataSetTransformController.java index 4c5ff8b0..94ad3ca0 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/controller/DataSetTransformController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/controller/DataSetTransformController.java @@ -1,12 +1,12 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.controller; import com.anji.plus.gaea.curd.controller.GaeaBaseController; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.param.DataSetTransformParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity.DataSetTransform; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.DataSetTransformService; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.param.DataSetTransformParam; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity.DataSetTransform; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.DataSetTransformService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; @@ -41,4 +41,4 @@ public class DataSetTransformController extends GaeaBaseController { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/dao/entity/DataSetTransform.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/dao/entity/DataSetTransform.java similarity index 92% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/dao/entity/DataSetTransform.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/dao/entity/DataSetTransform.java index 4ad053ed..281db47d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/dao/entity/DataSetTransform.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/dao/entity/DataSetTransform.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/DataSetTransformService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/DataSetTransformService.java similarity index 52% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/DataSetTransformService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/DataSetTransformService.java index 41997d30..1bc059c8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/DataSetTransformService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/DataSetTransformService.java @@ -1,11 +1,11 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.service; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.param.DataSetTransformParam; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity.DataSetTransform; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.param.DataSetTransformParam; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity.DataSetTransform; import java.util.List; @@ -18,4 +18,4 @@ public interface DataSetTransformService extends GaeaBaseService transform(List dataSetTransformDtoList, List data); -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/TransformStrategy.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/TransformStrategy.java similarity index 68% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/TransformStrategy.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/TransformStrategy.java index b8935771..c61855bd 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/TransformStrategy.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/TransformStrategy.java @@ -1,7 +1,7 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.service; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; import java.util.List; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DataSetTransformServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DataSetTransformServiceImpl.java similarity index 78% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DataSetTransformServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DataSetTransformServiceImpl.java index f61d1167..4d3dbb80 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DataSetTransformServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DataSetTransformServiceImpl.java @@ -1,13 +1,13 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.impl; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.service.impl; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.DataSetTransformMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.dao.entity.DataSetTransform; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.DataSetTransformService; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.DataSetTransformMapper; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.dao.entity.DataSetTransform; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.DataSetTransformService; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.TransformStrategy; import org.springframework.beans.BeansException; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; @@ -68,4 +68,4 @@ public class DataSetTransformServiceImpl implements DataSetTransformService, Ini } return data; } -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DictTransformServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DictTransformServiceImpl.java similarity index 82% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DictTransformServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DictTransformServiceImpl.java index ff4de0ed..3922bf1e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/DictTransformServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/DictTransformServiceImpl.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.impl; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.service.impl; import com.alibaba.fastjson.JSONObject; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.TransformStrategy; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/JsTransformServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/JsTransformServiceImpl.java similarity index 85% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/JsTransformServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/JsTransformServiceImpl.java index 73208467..4adaa2dc 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSetTransform/service/impl/JsTransformServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSetTransform/service/impl/JsTransformServiceImpl.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.impl; +package com.anjiplus.template.gaea.business.modules.dataSetTransform.service.impl; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.exception.BusinessExceptionBuilder; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.controller.dto.DataSetTransformDto; -import com.anjiplus.template.gaea.business.modules.data.dataSetTransform.service.TransformStrategy; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.controller.dto.DataSetTransformDto; +import com.anjiplus.template.gaea.business.modules.dataSetTransform.service.TransformStrategy; import com.anjiplus.template.gaea.business.code.ResponseCode; import jdk.nashorn.api.scripting.ScriptObjectMirror; import lombok.extern.slf4j.Slf4j; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientConfig.java similarity index 99% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientConfig.java index 01e1dcf3..463704cf 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientConfig.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.config; +package com.anjiplus.template.gaea.business.modules.dataSource.config; import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientPoolConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientPoolConfig.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientPoolConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientPoolConfig.java index a8b91faa..7945c535 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/config/HttpClientPoolConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/config/HttpClientPoolConfig.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.config; +package com.anjiplus.template.gaea.business.modules.dataSource.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/DataSourceController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/DataSourceController.java similarity index 74% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/DataSourceController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/DataSourceController.java index 8e569e9e..06f633fc 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/DataSourceController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/DataSourceController.java @@ -1,14 +1,14 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.controller; +package com.anjiplus.template.gaea.business.modules.dataSource.controller; import com.anji.plus.gaea.bean.ResponseBean; import com.anji.plus.gaea.curd.controller.GaeaBaseController; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.dto.DataSourceDto; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param.ConnectionParam; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param.DataSourceParam; -import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.DataSource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.service.DataSourceService; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.dto.DataSourceDto; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.param.ConnectionParam; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.param.DataSourceParam; +import com.anjiplus.template.gaea.business.modules.dataSource.dao.entity.DataSource; +import com.anjiplus.template.gaea.business.modules.dataSource.service.DataSourceService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; @@ -64,4 +64,4 @@ public class DataSourceController extends GaeaBaseController contextData; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/ConnectionParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/ConnectionParam.java similarity index 90% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/ConnectionParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/ConnectionParam.java index 0ccb40cf..2b493762 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/ConnectionParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/ConnectionParam.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param; +package com.anjiplus.template.gaea.business.modules.dataSource.controller.param; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/DataSourceParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/DataSourceParam.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/DataSourceParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/DataSourceParam.java index 1804b03d..85410097 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/controller/param/DataSourceParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/controller/param/DataSourceParam.java @@ -1,5 +1,5 @@ /**/ -package com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param; +package com.anjiplus.template.gaea.business.modules.dataSource.controller.param; import com.anji.plus.gaea.annotation.Query; import com.anji.plus.gaea.constant.QueryEnum; @@ -28,4 +28,4 @@ public class DataSourceParam extends PageParam implements Serializable{ /** 数据源类型 DIC_NAME=SOURCE_TYPE; mysql,orace,sqlserver,elasticsearch,接口,javaBean,数据源类型字典中item-extend动态生成表单 */ @Query(QueryEnum.EQ) private String sourceType; -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/DataSourceMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/DataSourceMapper.java similarity index 61% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/DataSourceMapper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/DataSourceMapper.java index dcf1e224..eb7493a3 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/DataSourceMapper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/DataSourceMapper.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.dao; +package com.anjiplus.template.gaea.business.modules.dataSource.dao; import org.apache.ibatis.annotations.Mapper; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.DataSource; +import com.anjiplus.template.gaea.business.modules.dataSource.dao.entity.DataSource; /** * DataSource Mapper @@ -13,4 +13,4 @@ import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.Da @Mapper public interface DataSourceMapper extends GaeaBaseMapper { -} \ No newline at end of file +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/entity/DataSource.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/entity/DataSource.java similarity index 95% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/entity/DataSource.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/entity/DataSource.java index cf10e553..04c1e6d5 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/dao/entity/DataSource.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/dao/entity/DataSource.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity; +package com.anjiplus.template.gaea.business.modules.dataSource.dao.entity; import com.anji.plus.gaea.annotation.Unique; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java index f7354808..8fd16e0f 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; /** * 配置接口 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java similarity index 67% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IDataSourceConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java index fb90392c..74dc45aa 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IDataSourceConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; import javax.sql.DataSource; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/ILifeCycle.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java similarity index 75% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/ILifeCycle.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java index 5f0089df..21b4b63f 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/ILifeCycle.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; /** * 生命周期管理 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IPooledDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java similarity index 92% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IPooledDataSourceConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java index f542c7de..8db6078d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/api/IPooledDataSourceConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java @@ -1,6 +1,6 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.IPooledConnection; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.IPooledConnection; /** * 池化的接口 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/IPooledConnection.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/IPooledConnection.java similarity index 83% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/IPooledConnection.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/IPooledConnection.java index f0365db0..4c746f88 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/IPooledConnection.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/IPooledConnection.java @@ -1,6 +1,6 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.connection; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig; import java.sql.Connection; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/PooledConnection.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/PooledConnection.java similarity index 97% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/PooledConnection.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/PooledConnection.java index 8d5f03df..5d54e3f8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/connection/PooledConnection.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/connection/PooledConnection.java @@ -1,7 +1,7 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.connection; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception.JdbcPoolException; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.exception.JdbcPoolException; import lombok.extern.slf4j.Slf4j; import java.sql.*; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/JdbcConstants.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/JdbcConstants.java similarity index 98% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/JdbcConstants.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/JdbcConstants.java index 419b72cf..9b267c09 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/JdbcConstants.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/JdbcConstants.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.constant; /** * Created by raodeming on 2021/3/19. diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/PooledConst.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/PooledConst.java similarity index 94% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/PooledConst.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/PooledConst.java index b584060d..b3d6482f 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/constant/PooledConst.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/constant/PooledConst.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.constant; /** * 线程池常量 diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractDataSourceConfig.java similarity index 92% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractDataSourceConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractDataSourceConfig.java index 786bc5f7..dff3776d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractDataSourceConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractDataSourceConfig.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource; /** * @author binbin.hou diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java index 786fb5ec..74e82139 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/AbstractPooledDataSourceConfig.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.ILifeCycle; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IPooledDataSourceConfig; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.constant.PooledConst; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.ILifeCycle; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IPooledDataSourceConfig; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.constant.PooledConst; /** * @author binbin.hou diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/DataSourceConfigAdaptor.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/DataSourceConfigAdaptor.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/DataSourceConfigAdaptor.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/DataSourceConfigAdaptor.java index dcab7f88..2e19fc9a 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/DataSourceConfigAdaptor.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/DataSourceConfigAdaptor.java @@ -1,6 +1,6 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.api.IDataSourceConfig; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.api.IDataSourceConfig; import java.io.PrintWriter; import java.sql.Connection; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/PooledDataSource.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/PooledDataSource.java similarity index 93% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/PooledDataSource.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/PooledDataSource.java index 24b7def2..e8487336 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/PooledDataSource.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/PooledDataSource.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.IPooledConnection; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.connection.PooledConnection; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception.JdbcPoolException; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.DriverClassUtil; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.IPooledConnection; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.PooledConnection; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.exception.JdbcPoolException; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.util.DriverClassUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/UnPooledDataSource.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/UnPooledDataSource.java similarity index 79% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/UnPooledDataSource.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/UnPooledDataSource.java index e45010c9..dbf8c66c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/datasource/UnPooledDataSource.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/datasource/UnPooledDataSource.java @@ -1,6 +1,6 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util.DriverClassUtil; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.util.DriverClassUtil; import org.apache.commons.lang3.StringUtils; import java.sql.Connection; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/exception/JdbcPoolException.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/exception/JdbcPoolException.java similarity index 87% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/exception/JdbcPoolException.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/exception/JdbcPoolException.java index ace4113d..682f831c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/exception/JdbcPoolException.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/exception/JdbcPoolException.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.exception; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.exception; /** * @author binbin.hou diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DataSourceHandleUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DataSourceHandleUtil.java similarity index 63% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DataSourceHandleUtil.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DataSourceHandleUtil.java index 604ceeae..981d87a8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DataSourceHandleUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DataSourceHandleUtil.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.util; /** * Created by raodeming on 2021/3/19. diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DriverClassUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DriverClassUtil.java similarity index 97% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DriverClassUtil.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DriverClassUtil.java index 5f3973f3..ed2917f1 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/DriverClassUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/DriverClassUtil.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.util; import com.anji.plus.gaea.exception.BusinessExceptionBuilder; import com.anjiplus.template.gaea.business.code.ResponseCode; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/JdbcUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/JdbcUtil.java similarity index 88% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/JdbcUtil.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/JdbcUtil.java index 94d6eb26..e8a72bc0 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/pool/util/JdbcUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/util/JdbcUtil.java @@ -1,8 +1,8 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.pool.util; +package com.anjiplus.template.gaea.business.modules.dataSource.pool.util; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.dto.DataSourceDto; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource.PooledDataSource; -import com.anjiplus.template.gaea.business.modules.data.dataSource.pool.datasource.UnPooledDataSource; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.dto.DataSourceDto; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource.PooledDataSource; +import com.anjiplus.template.gaea.business.modules.dataSource.pool.datasource.UnPooledDataSource; import lombok.extern.slf4j.Slf4j; import java.sql.Connection; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/service/DataSourceService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/service/DataSourceService.java similarity index 60% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/service/DataSourceService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/service/DataSourceService.java index 220b0b25..72ddf4fd 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/dataSource/service/DataSourceService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/service/DataSourceService.java @@ -1,13 +1,13 @@ -package com.anjiplus.template.gaea.business.modules.data.dataSource.service; +package com.anjiplus.template.gaea.business.modules.dataSource.service; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.dto.DataSourceDto; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param.ConnectionParam; -import com.anjiplus.template.gaea.business.modules.data.dataSource.controller.param.DataSourceParam; -import com.anjiplus.template.gaea.business.modules.data.dataSource.dao.entity.DataSource; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.dto.DataSourceDto; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.param.ConnectionParam; +import com.anjiplus.template.gaea.business.modules.dataSource.controller.param.DataSourceParam; +import com.anjiplus.template.gaea.business.modules.dataSource.dao.entity.DataSource; import java.util.List; @@ -45,4 +45,4 @@ public interface DataSourceService extends GaeaBaseService { + + void delReport(ReportDto reportDto); +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/report/service/impl/ReportServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java similarity index 62% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/report/service/impl/ReportServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java index 34104887..838315c7 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/report/service/impl/ReportServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java @@ -1,12 +1,12 @@ -package com.anjiplus.template.gaea.business.modules.data.report.service.impl; +package com.anjiplus.template.gaea.business.modules.report.service.impl; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.report.controller.dto.ReportDto; -import com.anjiplus.template.gaea.business.modules.data.report.dao.ReportMapper; -import com.anjiplus.template.gaea.business.modules.data.report.dao.entity.Report; -import com.anjiplus.template.gaea.business.modules.data.report.service.ReportService; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.ReportExcelMapper; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel; +import com.anjiplus.template.gaea.business.modules.report.controller.dto.ReportDto; +import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper; +import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report; +import com.anjiplus.template.gaea.business.modules.report.service.ReportService; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/ReportExcelController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java similarity index 86% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/ReportExcelController.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java index 2d9d7451..5ab7457d 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/ReportExcelController.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.controller; +package com.anjiplus.template.gaea.business.modules.reportexcel.controller; import com.anji.plus.gaea.annotation.Permission; import com.anji.plus.gaea.annotation.log.GaeaAuditLog; @@ -6,10 +6,10 @@ import com.anji.plus.gaea.bean.ResponseBean; import com.anji.plus.gaea.code.ResponseCode; import com.anji.plus.gaea.curd.controller.GaeaBaseController; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.dto.ReportExcelDto; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.param.ReportExcelParam; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.service.ReportExcelService; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; +import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/dto/ReportExcelDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java similarity index 89% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/dto/ReportExcelDto.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java index ed36dd48..22c273e7 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/dto/ReportExcelDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.dto; +package com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto; import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/param/ReportExcelParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java similarity index 73% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/param/ReportExcelParam.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java index 11d0a9f2..e4d85806 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/controller/param/ReportExcelParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java @@ -1,5 +1,5 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.param; +package com.anjiplus.template.gaea.business.modules.reportexcel.controller.param; import com.anji.plus.gaea.curd.params.PageParam; import lombok.Data; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/ReportExcelMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java similarity index 52% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/ReportExcelMapper.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java index 2fe2ac51..422b83f8 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/ReportExcelMapper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java @@ -1,7 +1,7 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.dao; +package com.anjiplus.template.gaea.business.modules.reportexcel.dao; import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; /** * @author chenkening diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/entity/ReportExcel.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java similarity index 91% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/entity/ReportExcel.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java index 45cb42fb..ea55d556 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/dao/entity/ReportExcel.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity; +package com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/ReportExcelService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java similarity index 65% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/ReportExcelService.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java index 8d5c9577..883899b6 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/ReportExcelService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java @@ -1,9 +1,9 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.service; +package com.anjiplus.template.gaea.business.modules.reportexcel.service; import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.dto.ReportExcelDto; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.param.ReportExcelParam; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; /** * TODO diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/impl/ReportExcelServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java similarity index 88% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/impl/ReportExcelServiceImpl.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java index 804fd4a7..4963f54c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/service/impl/ReportExcelServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java @@ -1,4 +1,4 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.service.impl; +package com.anjiplus.template.gaea.business.modules.reportexcel.service.impl; import com.alibaba.fastjson.JSONObject; import com.anji.plus.gaea.constant.BaseOperationEnum; @@ -11,13 +11,13 @@ import com.anji.plus.gaea.holder.UserContentHolder; import com.anji.plus.gaea.utils.GaeaAssert; import com.anji.plus.gaea.utils.GaeaBeanUtils; import com.anjiplus.template.gaea.business.code.ResponseCode; -import com.anjiplus.template.gaea.business.modules.data.report.dao.ReportMapper; -import com.anjiplus.template.gaea.business.modules.data.report.dao.entity.Report; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.dto.ReportExcelDto; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.ReportExcelMapper; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.dao.entity.ReportExcel; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.service.ReportExcelService; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.util.ReportUtil; +import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper; +import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper; +import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel; +import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService; +import com.anjiplus.template.gaea.business.modules.reportexcel.util.ReportUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/util/ReportUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java similarity index 99% rename from report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/util/ReportUtil.java rename to report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java index f0d58b4c..bcebc34a 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/data/reportexcel/util/ReportUtil.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java @@ -1,15 +1,15 @@ -package com.anjiplus.template.gaea.business.modules.data.reportexcel.util; +package com.anjiplus.template.gaea.business.modules.reportexcel.util; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.parser.Feature; import com.anji.plus.gaea.export.utils.QrCodeOrBarCodeUtil; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.DataSetDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.controller.dto.OriginalDataDto; -import com.anjiplus.template.gaea.business.modules.data.dataSet.service.DataSetService; -import com.anjiplus.template.gaea.business.modules.data.report.constant.ExpConstant; -import com.anjiplus.template.gaea.business.modules.data.reportexcel.controller.dto.ReportExcelDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto; +import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto; +import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService; +import com.anjiplus.template.gaea.business.modules.report.constant.ExpConstant; +import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto; import freemarker.template.Configuration; import freemarker.template.Template; import org.apache.commons.lang3.StringUtils; diff --git a/report-core/src/main/resources/mapper/DataSetMapper.xml b/report-core/src/main/resources/mapper/DataSetMapper.xml index 88731dbc..55a72c76 100644 --- a/report-core/src/main/resources/mapper/DataSetMapper.xml +++ b/report-core/src/main/resources/mapper/DataSetMapper.xml @@ -1,7 +1,7 @@ - + - + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/report-core/src/main/resources/mapper/DataSetParamMapper.xml b/report-core/src/main/resources/mapper/DataSetParamMapper.xml index 428988c2..eebdfa8a 100644 --- a/report-core/src/main/resources/mapper/DataSetParamMapper.xml +++ b/report-core/src/main/resources/mapper/DataSetParamMapper.xml @@ -1,7 +1,7 @@ - + - + @@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/report-core/src/main/resources/mapper/DataSetTransformMapper.xml b/report-core/src/main/resources/mapper/DataSetTransformMapper.xml index dca23fa3..ee3cb7ce 100644 --- a/report-core/src/main/resources/mapper/DataSetTransformMapper.xml +++ b/report-core/src/main/resources/mapper/DataSetTransformMapper.xml @@ -1,7 +1,7 @@ - + - + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/report-core/src/main/resources/mapper/DataSourceMapper.xml b/report-core/src/main/resources/mapper/DataSourceMapper.xml index af55c19e..8ae699f0 100644 --- a/report-core/src/main/resources/mapper/DataSourceMapper.xml +++ b/report-core/src/main/resources/mapper/DataSourceMapper.xml @@ -1,7 +1,7 @@ - + - + @@ -25,4 +25,4 @@ - \ No newline at end of file + diff --git a/report-core/src/main/resources/mapper/ReportDashboardMapper.xml b/report-core/src/main/resources/mapper/ReportDashboardMapper.xml index ab9aa8bf..8fb4c3c6 100644 --- a/report-core/src/main/resources/mapper/ReportDashboardMapper.xml +++ b/report-core/src/main/resources/mapper/ReportDashboardMapper.xml @@ -1,7 +1,7 @@ - + - + @@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml b/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml index 476e6388..891f2b02 100644 --- a/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml +++ b/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml @@ -1,7 +1,7 @@ - + - + diff --git a/report-core/src/main/resources/mapper/ReportExcelMapper.xml b/report-core/src/main/resources/mapper/ReportExcelMapper.xml index 216277cc..41a7bcf8 100644 --- a/report-core/src/main/resources/mapper/ReportExcelMapper.xml +++ b/report-core/src/main/resources/mapper/ReportExcelMapper.xml @@ -1,7 +1,7 @@ - + - + diff --git a/report-core/src/main/resources/mapper/ReportMapper.xml b/report-core/src/main/resources/mapper/ReportMapper.xml index 1a506d65..b63ef940 100644 --- a/report-core/src/main/resources/mapper/ReportMapper.xml +++ b/report-core/src/main/resources/mapper/ReportMapper.xml @@ -1,7 +1,7 @@ - + - + From 18fb98fd37c364822fbbdbdefb79727bfe38cd0e Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 23 Jun 2021 17:02:39 +0800 Subject: [PATCH 4/5] doc --- doc/docs/.vuepress/config.js | 36 ++++++++++++----- doc/docs/guide/devdoc.md | 1 - doc/docs/guide/productintro.md | 68 ++++++++++++++++++++++++++++++++ doc/docs/guide/quickly.md | 6 +-- doc/docs/operation/README.md | 25 ++++++++++++ doc/docs/operation/dashboard.md | 32 +++++++++++++++ doc/docs/operation/dataset.md | 32 +++++++++++++++ doc/docs/operation/datasource.md | 3 ++ doc/docs/operation/dict.md | 32 +++++++++++++++ doc/docs/operation/i18n.md | 32 +++++++++++++++ 10 files changed, 253 insertions(+), 14 deletions(-) delete mode 100644 doc/docs/guide/devdoc.md create mode 100644 doc/docs/operation/README.md create mode 100644 doc/docs/operation/dashboard.md create mode 100644 doc/docs/operation/dataset.md create mode 100644 doc/docs/operation/datasource.md create mode 100644 doc/docs/operation/dict.md create mode 100644 doc/docs/operation/i18n.md diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js index b6deb7e4..0f49c019 100644 --- a/doc/docs/.vuepress/config.js +++ b/doc/docs/.vuepress/config.js @@ -11,7 +11,8 @@ module.exports = { sidebarDepth: 2, nav: [ {text: '首页', link: '/'}, - {text: '文档', link: '/guide/'}, + {text: '指南', link: '/guide/'}, + {text: '操作手册', link: '/operation/'}, {text: 'GitHub', link: 'https://github.com/anji-plus/report'}, {text: 'Gitee', link: 'https://gitee.com/anji-plus/report'}, ], @@ -22,17 +23,11 @@ module.exports = { collapsable: false, children: [ {title: '介绍', path: '/guide/'}, - {title: '快速了解', path: '/guide/quickly'}, + {title: '快速入门', path: '/guide/quickly'}, {title: '项目介绍', path: '/guide/productintro'}, - {title: '系统运行', path: '/guide/deploy'}, - {title: '开发手册', path: '/guide/devdoc'} + {title: '系统运行', path: '/guide/deploy'} ] }, - { - title: '盖亚底盘', - collapsable: false, - children: [] - }, { title: '其他', collapsable: false, @@ -40,6 +35,29 @@ module.exports = { {title: '常见问题', path: '/guide/question'} ] }], + '/operation/': [ + { + title: '操作手册', + collapsable: false, + children: [ + {title: '数据源', path: '/operation/datasource'}, + {title: '数据集', path: '/operation/dataset'}, + {title: '大屏设计', path: '/operation/dashboard'}, + {title: '国际化', path: '/operation/i18n'}, + {title: '字典', path: '/operation/dict'}, + ] + } + ] + } + }, + plugins: [ + ['@vuepress/back-to-top', true], + ], + configureWebpack: { + resolve: { + alias: { + '@': '/.vuepress/public' + } } } } diff --git a/doc/docs/guide/devdoc.md b/doc/docs/guide/devdoc.md deleted file mode 100644 index a5b829eb..00000000 --- a/doc/docs/guide/devdoc.md +++ /dev/null @@ -1 +0,0 @@ -# 开发手册 diff --git a/doc/docs/guide/productintro.md b/doc/docs/guide/productintro.md index 1476139c..ef1ff01e 100644 --- a/doc/docs/guide/productintro.md +++ b/doc/docs/guide/productintro.md @@ -1 +1,69 @@ # 项目介绍 + +# 项目介绍 +在线拖拽大屏设计,后续会持续更新新的功能。 + + +## 文件结构 +### 系统目录 +- +``` +├── doc 文档源码 +│ ├── docs +│ ├── package.json +│ └── README.md +├── pom.xml 父pom,jar版本管理 +├── report-core java源码 +│ ├── pom.xml gaea父pom,jar版本管理 +│ └── README.md +├── report-ui 前端vue源码 +├── LICENSE +├── README.md +``` +### 前端 +``` +├── build # 构建相关 +├── mock # 项目mock 模拟数据 +├── public # 静态资源 +│ │── favicon.ico # favicon图标 +│ └── index.html # html模板 +├── src # 源代码 +│ ├── api # 所有请求 +│ ├── assets # 主题 字体等静态资源 +│ ├── components # 全局公用组件 +│ ├── directive # 全局指令 +│ ├── icons # 项目所有 svg icons +│ ├── lang # 国际化 language +│ ├── layout # 全局 layout +│ ├── router # 路由 +│ ├── store # 全局 store管理 +│ ├── styles # 全局样式 +│ ├── utils # 全局公用方法 +│ ├── views # views 所有页面 +│ ├── App.vue # 入口页面 +│ ├── main.js # 入口文件 加载组件 初始化等 +│ └── permission.js # 权限管理 +├── .env.xxx # 环境变量配置 +├── .eslintrc.js # eslint 配置项 +├── .babelrc # babel-loader 配置 +├── .travis.yml # 自动化CI配置 +├── vue.config.js # vue-cli 配置 +├── postcss.config.js # postcss 配置 +└── package.json # package.json +``` + +## 核心技术 +### 后端 +- [Spring Boot](https://spring.io/projects/spring-boot/): Spring Boot是一款开箱即用框架,让我们的Spring应用变的更轻量化、更快的入门。 在主程序执行main函数就可以运行。你也可以打包你的应用为jar并通过使用java -jar来运行你的Web应用; +- [Mybatis-plus](https://mp.baomidou.com/): MyBatis-plus(简称 MP)是一个 MyBatis (opens new window) 的增强工具。 +- [flyway](https://flywaydb.org/): 主要用于在你的应用版本不断升级的同时,升级你的数据库结构和里面的数据 +### 前端 +- [npm](https://www.npmjs.com/):node.js的包管理工具,用于统一管理我们前端项目中需要用到的包、插件、工具、命令等,便于开发和维护。 +- [webpack](https://webpack.docschina.org/):用于现代 JavaScript 应用程序的_静态模块打包工具 +- [ES6](https://es6.ruanyifeng.com/):Javascript的新版本,ECMAScript6的简称。利用ES6我们可以简化我们的JS代码,同时利用其提供的强大功能来快速实现JS逻辑。 +- [vue-cli](https://cli.vuejs.org/):Vue的脚手架工具,用于自动生成Vue项目的目录及文件。 +- [vue-router](https://router.vuejs.org/): Vue提供的前端路由工具,利用其我们实现页面的路由控制,局部刷新及按需加载,构建单页应用,实现前后端分离。 +- [vuex](https://vuex.vuejs.org/):Vue提供的状态管理工具,用于统一管理我们项目中各种数据的交互和重用,存储我们需要用到数据对象。 +- [element-ui](https://element.eleme.cn/#/zh-CN):基于MVVM框架Vue开源出来的一套前端ui组件。 +- [vue-element-admin](https://panjiachen.gitee.io/vue-element-admin-site/):后台前端解决方案,它基于 vue 和 element-ui实现 + diff --git a/doc/docs/guide/quickly.md b/doc/docs/guide/quickly.md index 3a1c4b86..f50cb745 100644 --- a/doc/docs/guide/quickly.md +++ b/doc/docs/guide/quickly.md @@ -5,8 +5,8 @@ - 在线提问: - 在线文档: -大屏设计(Report)是一个JavaEE微服务架构平台,采用经典组合(SpringBoot,SpringCloud,Vue,ElementUI)。目前提供两种架构,单体架构和微服务架构。 -内置的基础功能包括数据源,数据集,报表管理 +大屏设计(Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具项目。 +内置的基础功能包括数据源,数据集,国际化,字典管理,报表管理 ## 技术选型 @@ -17,8 +17,6 @@ **2.主框架** - Spring Boot 2.3.x -- Spring Cloud Hoxton.SR9 -- Spring Security 5.3.x **3.持久层** - Apache MyBatis 3.5.x diff --git a/doc/docs/operation/README.md b/doc/docs/operation/README.md new file mode 100644 index 00000000..1520bf70 --- /dev/null +++ b/doc/docs/operation/README.md @@ -0,0 +1,25 @@ +# 介绍 +--- + +**大屏设计** + +大屏设计(Report)是一个JavaEE微服务架构平台,采用经典组合(SpringBoot,SpringCloud,Vue,ElementUI)。目前提供两种架构,单体架构和微服务架构。 +内置的基础功能包括数据源,数据集,报表管理 + +**功能架构** +- 前端 + + +- 后端 + + +**在线体验** +- 访问地址 + +- 默认账号密码 + + +**联系我们** + + + diff --git a/doc/docs/operation/dashboard.md b/doc/docs/operation/dashboard.md new file mode 100644 index 00000000..f50cb745 --- /dev/null +++ b/doc/docs/operation/dashboard.md @@ -0,0 +1,32 @@ +# 快速了解 +--- +## 项目简介 +- 项目源代码地址: +- 在线提问: +- 在线文档: + +大屏设计(Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具项目。 +内置的基础功能包括数据源,数据集,国际化,字典管理,报表管理 + + +## 技术选型 + +**1.环境** +- JavaEE 8 +- Apache Maven 3 + +**2.主框架** +- Spring Boot 2.3.x + +**3.持久层** +- Apache MyBatis 3.5.x + +**4.视图层** +- Vue 2.6.10+ +- ElementUI 2.13.0+ + + +## 系统特性 +1. 最新最稳定的技术栈; +2. 支持多数据源配置 +3. 丰富的大屏组件。拖拽配置实现动态大屏 diff --git a/doc/docs/operation/dataset.md b/doc/docs/operation/dataset.md new file mode 100644 index 00000000..f50cb745 --- /dev/null +++ b/doc/docs/operation/dataset.md @@ -0,0 +1,32 @@ +# 快速了解 +--- +## 项目简介 +- 项目源代码地址: +- 在线提问: +- 在线文档: + +大屏设计(Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具项目。 +内置的基础功能包括数据源,数据集,国际化,字典管理,报表管理 + + +## 技术选型 + +**1.环境** +- JavaEE 8 +- Apache Maven 3 + +**2.主框架** +- Spring Boot 2.3.x + +**3.持久层** +- Apache MyBatis 3.5.x + +**4.视图层** +- Vue 2.6.10+ +- ElementUI 2.13.0+ + + +## 系统特性 +1. 最新最稳定的技术栈; +2. 支持多数据源配置 +3. 丰富的大屏组件。拖拽配置实现动态大屏 diff --git a/doc/docs/operation/datasource.md b/doc/docs/operation/datasource.md new file mode 100644 index 00000000..3625ab12 --- /dev/null +++ b/doc/docs/operation/datasource.md @@ -0,0 +1,3 @@ +# 数据源 + +## 标题一 diff --git a/doc/docs/operation/dict.md b/doc/docs/operation/dict.md new file mode 100644 index 00000000..f50cb745 --- /dev/null +++ b/doc/docs/operation/dict.md @@ -0,0 +1,32 @@ +# 快速了解 +--- +## 项目简介 +- 项目源代码地址: +- 在线提问: +- 在线文档: + +大屏设计(Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具项目。 +内置的基础功能包括数据源,数据集,国际化,字典管理,报表管理 + + +## 技术选型 + +**1.环境** +- JavaEE 8 +- Apache Maven 3 + +**2.主框架** +- Spring Boot 2.3.x + +**3.持久层** +- Apache MyBatis 3.5.x + +**4.视图层** +- Vue 2.6.10+ +- ElementUI 2.13.0+ + + +## 系统特性 +1. 最新最稳定的技术栈; +2. 支持多数据源配置 +3. 丰富的大屏组件。拖拽配置实现动态大屏 diff --git a/doc/docs/operation/i18n.md b/doc/docs/operation/i18n.md new file mode 100644 index 00000000..f50cb745 --- /dev/null +++ b/doc/docs/operation/i18n.md @@ -0,0 +1,32 @@ +# 快速了解 +--- +## 项目简介 +- 项目源代码地址: +- 在线提问: +- 在线文档: + +大屏设计(Report)是一个可视化拖拽编辑的,直观,酷炫,具有科技感的图表工具项目。 +内置的基础功能包括数据源,数据集,国际化,字典管理,报表管理 + + +## 技术选型 + +**1.环境** +- JavaEE 8 +- Apache Maven 3 + +**2.主框架** +- Spring Boot 2.3.x + +**3.持久层** +- Apache MyBatis 3.5.x + +**4.视图层** +- Vue 2.6.10+ +- ElementUI 2.13.0+ + + +## 系统特性 +1. 最新最稳定的技术栈; +2. 支持多数据源配置 +3. 丰富的大屏组件。拖拽配置实现动态大屏 From 1a086a52599d0f1792a43e1214d0385f8af528e5 Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Thu, 24 Jun 2021 13:58:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=AE=80=E5=8D=95=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- derby.log | 13 ++ report-core/pom.xml | 51 +++--- .../gaea/business/ReportApplication.java | 6 +- .../business/cache/ReportCacheHelper.java | 29 ++-- .../gaea/business/code/ResponseCode.java | 10 ++ .../config/BusinessAutoConfiguration.java | 2 +- .../gaea/business/filter/TokenFilter.java | 75 ++++++++ .../controller/GaeaExportController.java | 74 -------- .../export/controller/dto/GaeaExportDTO.java | 144 ---------------- .../controller/param/GaeaExportParam.java | 26 --- .../param/GaeaExportQueryParam.java | 23 --- .../modules/export/dao/GaeaExportMapper.java | 30 ---- .../modules/export/dao/entity/GaeaExport.java | 126 -------------- .../export/service/GaeaExportService.java | 32 ---- .../service/impl/GaeaExportServiceImpl.java | 73 -------- .../file/controller/dto/GaeaFileDTO.java | 58 ++----- .../file/controller/param/GaeaFileParam.java | 16 +- .../modules/file/entity/GaeaFile.java | 55 ++---- .../modules/file/service/GaeaFileService.java | 2 +- .../service/impl/GaeaFileServiceImpl.java | 43 ++--- .../modules/file/util/StringPatternUtil.java | 98 +++++++++++ .../controller/GaeaUiI18nController.java | 100 ----------- .../controller/dto/GaeaUiI18nDto.java | 50 ------ .../controller/param/GaeaUiI18nParam.java | 54 ------ .../gaeaUiI18n/dao/GaeaUiI18nMapper.java | 33 ---- .../gaeaUiI18n/dao/entity/GaeaUiI18n.java | 46 ----- .../gaeaUiI18n/service/GaeaUiI18nService.java | 46 ----- .../gaeaUiI18n/service/impl/ColumnDesc.java | 11 -- .../service/impl/GaeaUiI18nServiceImpl.java | 162 ------------------ .../service/impl/ReportExcelServiceImpl.java | 2 +- .../user/controller/LoginController.java | 34 ++++ .../modules/user/dao/GaeaUserMapper.java | 12 ++ .../modules/user/dao/entity/GaeaUser.java | 23 +++ .../modules/user/dto/GaeaUserDTO.java | 23 +++ .../modules/user/service/UserService.java | 10 ++ .../user/service/impl/UserServiceImpl.java | 86 ++++++++++ .../src/main/resources/bootstrap-dev.yml | 19 +- report-core/src/main/resources/bootstrap.yml | 2 +- .../resources/i18n/messages_en_US.properties | 3 + .../resources/i18n/messages_zh_CN.properties | 4 + .../resources/mapper/GaeaExportMapper.xml | 48 ------ .../resources/mapper/GaeaUiI18nMapper.xml | 50 ------ 42 files changed, 508 insertions(+), 1296 deletions(-) create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/GaeaExportController.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/dto/GaeaExportDTO.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportParam.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportQueryParam.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/GaeaExportMapper.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/entity/GaeaExport.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/GaeaExportService.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/impl/GaeaExportServiceImpl.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/util/StringPatternUtil.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/GaeaUiI18nController.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/dto/GaeaUiI18nDto.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/param/GaeaUiI18nParam.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/GaeaUiI18nMapper.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/entity/GaeaUiI18n.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/GaeaUiI18nService.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/ColumnDesc.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/GaeaUiI18nServiceImpl.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/controller/LoginController.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/GaeaUserMapper.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/entity/GaeaUser.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dto/GaeaUserDTO.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/UserService.java create mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/impl/UserServiceImpl.java delete mode 100644 report-core/src/main/resources/mapper/GaeaExportMapper.xml delete mode 100644 report-core/src/main/resources/mapper/GaeaUiI18nMapper.xml diff --git a/derby.log b/derby.log index e69de29b..408edefa 100644 --- a/derby.log +++ b/derby.log @@ -0,0 +1,13 @@ +---------------------------------------------------------------- +Thu Jun 24 13:44:40 CST 2021: +Booting Derby version The Apache Software Foundation - Apache Derby - 10.14.2.0 - (1828579): instance a816c00e-017a-3c8c-7997-00000fdd7788 +on database directory memory:D:\anji-code\gitee\aj-report\55b30257-1477-453c-b5b1-a9bbd7a931a7 with class loader sun.misc.Launcher$AppClassLoader@18b4aac2 +Loaded from file:/C:/Users/raodeming/.m2/repository/org/apache/derby/derby/10.14.2.0/derby-10.14.2.0.jar +java.vendor=Oracle Corporation +java.runtime.version=1.8.0_191-b12 +user.dir=D:\anji-code\gitee\aj-report +os.name=Windows 10 +os.arch=amd64 +os.version=10.0 +derby.system.home=null +Database Class Loader started - derby.database.classpath='' diff --git a/report-core/pom.xml b/report-core/pom.xml index 9afe842f..7bc70333 100644 --- a/report-core/pom.xml +++ b/report-core/pom.xml @@ -14,17 +14,13 @@ - com.anjiplus.template.gaea - template-gaea-common + org.projectlombok + lombok + + + com.anji-plus + spring-boot-gaea - - - - - - - - org.springframework.boot spring-boot-starter-data-redis @@ -33,10 +29,32 @@ - com.anjiplus.template.gaea - template-gaea-generator + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.cloud + spring-cloud-context + + + org.springframework.boot + spring-boot-starter-freemarker + + + + + + + + + + + + + com.baomidou mybatis-plus-boot-starter @@ -64,15 +82,6 @@ 2.10.6 - - - - - - - - - com.anji-plus spring-boot-starter-gaea-export diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/ReportApplication.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/ReportApplication.java index 45d32084..b4f7ea38 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/ReportApplication.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/ReportApplication.java @@ -4,6 +4,7 @@ import com.anji.plus.gaea.annotation.enabled.EnabledGaeaConfiguration; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScans; /** * 业务模板 @@ -11,7 +12,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * @since 2021-02-03 */ @EnabledGaeaConfiguration -@SpringBootApplication +@SpringBootApplication(scanBasePackages = { + "com.anjiplus.template.gaea", + "com.anji.plus" +}) @MapperScan(basePackages = { "com.anjiplus.template.gaea.business.modules.*.dao", "com.anjiplus.template.gaea.business.modules.*.**.dao", diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java index 5010945c..7cb03a5b 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/cache/ReportCacheHelper.java @@ -13,7 +13,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { @@ -24,7 +23,7 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { public String stringGet(String key) { Cache.ValueWrapper valueWrapper = cache.get(key); if (valueWrapper != null) { - return (String)valueWrapper.get(); + return (String) valueWrapper.get(); } return CacheHelper.super.stringGet(key); } @@ -38,7 +37,15 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { @Override public boolean exist(String key) { - return cache.get(key)!=null; + String cacheHoldTime = stringGet(key + "_HoldTime"); + if (cacheHoldTime != null && Long.parseLong(cacheHoldTime) > 0) { + if (Long.parseLong(cacheHoldTime) < System.currentTimeMillis()) { + delete(key + "_HoldTime"); + delete(key); + return false; + } + } + return cache.get(key) != null; } @@ -47,10 +54,6 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { cache.put(key, value); } - @Override - public void stringSetExpire(String key, String value, long time, TimeUnit timeUnit) { - CacheHelper.super.stringSetExpire(key, value, time, timeUnit); - } @Override public String regKey(String key) { @@ -59,7 +62,11 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { @Override public void stringSetExpire(String key, String value, long seconds) { - CacheHelper.super.stringSetExpire(key, value, seconds); + stringSet(key, value); + if (seconds > 0) { + //缓存失效时间 + stringSet(key + "_HoldTime", String.valueOf(System.currentTimeMillis() + seconds * 1000)); + } } @Override @@ -122,7 +129,9 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { @Override public boolean delete(String key) { - cache.evict(key); + if (exist(key)) { + cache.evict(key); + } return true; } @@ -136,6 +145,6 @@ public class ReportCacheHelper implements CacheHelper, ApplicationContextAware { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { /*基于内存的本地缓存*/ - cache = (Cache)applicationContext.getBean("ehCacheCache"); + cache = (Cache) applicationContext.getBean("ehCacheCache"); } } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java index 06f80598..742ba67e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/code/ResponseCode.java @@ -6,6 +6,15 @@ package com.anjiplus.template.gaea.business.code; * @since 2021-02-22 */ public interface ResponseCode { + /** + * 用户名或者密码不正确 + */ + String LOGIN_ERROR = "login.error"; + + /** + * 用户token过期 + */ + String USER_TOKEN_EXPIRED = "User.token.expired"; /** * 字典项重复 @@ -98,4 +107,5 @@ public interface ResponseCode { String SET_CODE_ISEXIST = "4008"; String SOURCE_CODE_ISEXIST = "4009"; String CLASS_NOT_FOUND = "4010"; + } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java index ce4ade6f..a5fbff03 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/config/BusinessAutoConfiguration.java @@ -30,7 +30,7 @@ public class BusinessAutoConfiguration { return new ApplicationInitRunner(); } - @Bean("gaeaCacheHelper") + @Bean public CacheHelper gaeaCacheHelper(){ return new ReportCacheHelper(); } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java new file mode 100644 index 00000000..1fe886b9 --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java @@ -0,0 +1,75 @@ +package com.anjiplus.template.gaea.business.filter; + + +import com.alibaba.fastjson.JSONObject; +import com.anji.plus.gaea.bean.ResponseBean; +import com.anji.plus.gaea.cache.CacheHelper; +import com.anji.plus.gaea.utils.JwtBean; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.servlet.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 简单的鉴权 + * Created by raodeming on 2021/6/24. + */ +@Component +public class TokenFilter implements Filter { + @Autowired + private CacheHelper cacheHelper; + @Autowired + private JwtBean jwtBean; + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + Filter.super.init(filterConfig); + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + HttpServletRequest request = (HttpServletRequest) servletRequest; + HttpServletResponse response = (HttpServletResponse) servletResponse; + String uri = request.getRequestURI(); + + if (!uri.startsWith("/login")) { + + //获取token + String authorization = request.getHeader("Authorization"); + if (StringUtils.isBlank(authorization)) { + error(response); + return; + } + + String username = jwtBean.getUsername(authorization); +// String uuid = jwtBean.getUUID(authorization); + + if (!cacheHelper.exist(username)) { + error(response); + return; + } + + //延长有效期 + cacheHelper.stringSetExpire(username, authorization, 3600); + } + + //执行 + filterChain.doFilter(request, response); + + } + + @Override + public void destroy() { + Filter.super.destroy(); + } + + private void error(HttpServletResponse response) throws IOException { + ResponseBean responseBean = ResponseBean.builder().code("500").message("The Token has expired").build(); + response.getWriter().print(JSONObject.toJSONString(responseBean)); + response.getOutputStream().flush(); + } +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/GaeaExportController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/GaeaExportController.java deleted file mode 100644 index d5206167..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/GaeaExportController.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.controller; - -import com.anji.plus.gaea.annotation.log.GaeaAuditLog; -import com.anji.plus.gaea.bean.ResponseBean; -import com.anji.plus.gaea.curd.controller.GaeaBaseController; -import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anji.plus.gaea.utils.GaeaBeanUtils; -import com.anjiplus.template.gaea.business.modules.export.controller.dto.GaeaExportDTO; -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportParam; -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportQueryParam; -import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport; -import com.anjiplus.template.gaea.business.modules.export.service.GaeaExportService; -import com.anji.plus.gaea.export.vo.ExportOperation; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * 导出中心(GaeaExport)实体类 - * - * @author makejava - * @since 2021-02-07 17:12:31 - */ -@RestController -@RequestMapping("/export") -@Api(value = "/export", tags = "导出中心") -public class GaeaExportController extends GaeaBaseController { - @Autowired - private GaeaExportService gaeaExportService; - - @Override - public GaeaBaseService getService() { - return gaeaExportService; - } - - @Override - public GaeaExport getEntity() { - return new GaeaExport(); - } - - @Override - public GaeaExportDTO getDTO() { - return new GaeaExportDTO(); - } - - @PostMapping("/queryAdvanceExport") - @GaeaAuditLog(pageTitle = "高级查询") - public ResponseBean queryExportInfo(@RequestBody GaeaExportQueryParam param) { - Page exportList=gaeaExportService.getExportListPage(param); - List list = exportList.getRecords().stream() - .map(entity -> GaeaBeanUtils.copyAndFormatter(entity, getDTO())) - .collect(Collectors.toList()); - Page pageDto = new Page<>(); - pageDto.setCurrent(exportList.getCurrent()); - pageDto.setRecords(list); - pageDto.setPages(exportList.getPages()); - pageDto.setTotal(exportList.getTotal()); - pageDto.setSize(exportList.getSize()); - return responseSuccessWithData(pageDto); - } - - @PostMapping("/saveExportLog") - public Boolean export(@RequestBody ExportOperation exportOperation) { - return gaeaExportService.saveExportLog(exportOperation); - } - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/dto/GaeaExportDTO.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/dto/GaeaExportDTO.java deleted file mode 100644 index b608ee91..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/dto/GaeaExportDTO.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.controller.dto; - -import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.time.LocalDateTime; -import java.util.Date; - -/** - * 导出中心(GaeaExport)实体类 - * - * @author makejava - * @since 2021-02-07 17:12:25 - */ -@ApiModel(value = "导出中心") -public class GaeaExportDTO extends GaeaBaseDTO { - /** - * 文件在t_file中的id,前端传它来读流接口显示,http://auth/file/download/fileId - */ - @ApiModelProperty(value = "文件在t_file中的id,前端传它来读流接口显示,http://auth/file/download/fileId") - private String fileId; - /** - * 文件标题,比如:对账单报表6月份报表 - */ - @ApiModelProperty(value = "文件标题,比如:对账单报表6月份报表") - private String fileTitle; - /** - * 导出前,查询的数据开始时间 - */ - @ApiModelProperty(value = "导出前,查询的数据开始时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private LocalDateTime resultStartTime; - /** - * 导出前,查询的数据结束时间 - */ - @ApiModelProperty(value = "导出前,查询的数据结束时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private LocalDateTime resultEndTime; - /** - * 导出查询结果,数据总条数 - */ - @ApiModelProperty(value = "导出查询结果,数据总条数") - private Long resultSize; - /** - * 文件导出触发时间 - */ - @ApiModelProperty(value = "文件导出触发时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private LocalDateTime fileCreateTime; - /** - * 文件生成完成时间 - */ - @ApiModelProperty(value = "文件生成完成时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private LocalDateTime fileFinishTime; - /** - * 文件状态,creating生成中,success生成成功,failed生成失败 - */ - @ApiModelProperty(value = "文件状态,creating生成中,success生成成功,failed生成失败") - private String fileStatus; - /** - * 备注 - */ - @ApiModelProperty(value = "备注") - private String remark; - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId; - } - - public String getFileTitle() { - return fileTitle; - } - - public void setFileTitle(String fileTitle) { - this.fileTitle = fileTitle; - } - - - - public Long getResultSize() { - return resultSize; - } - - public void setResultSize(Long resultSize) { - this.resultSize = resultSize; - } - - public LocalDateTime getResultStartTime() { - return resultStartTime; - } - - public void setResultStartTime(LocalDateTime resultStartTime) { - this.resultStartTime = resultStartTime; - } - - public LocalDateTime getResultEndTime() { - return resultEndTime; - } - - public void setResultEndTime(LocalDateTime resultEndTime) { - this.resultEndTime = resultEndTime; - } - - public LocalDateTime getFileCreateTime() { - return fileCreateTime; - } - - public void setFileCreateTime(LocalDateTime fileCreateTime) { - this.fileCreateTime = fileCreateTime; - } - - public LocalDateTime getFileFinishTime() { - return fileFinishTime; - } - - public void setFileFinishTime(LocalDateTime fileFinishTime) { - this.fileFinishTime = fileFinishTime; - } - - public String getFileStatus() { - return fileStatus; - } - - public void setFileStatus(String fileStatus) { - this.fileStatus = fileStatus; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportParam.java deleted file mode 100644 index bafb04ec..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportParam.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.controller.param; - - -import com.anji.plus.gaea.annotation.Query; -import com.anji.plus.gaea.constant.QueryEnum; -import com.anji.plus.gaea.curd.params.PageParam; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; - -/** - * 导出中心(GaeaExport)param - * - * @author makejava - * @since 2021-02-07 17:12:26 - */ -@Getter -@Setter -public class GaeaExportParam extends PageParam implements Serializable { - /** - * 文件标题 - */ - @Query(QueryEnum.LIKE) - private String fileTitle; -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportQueryParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportQueryParam.java deleted file mode 100644 index dd5eb2ee..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/controller/param/GaeaExportQueryParam.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.controller.param; - -import com.anjiplus.template.gaea.common.dto.BaseQueryBO; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; - -/** - * 功能描述: - * - * @Author: peiyanni - * @Date: 2021/2/20 12:49 - */ -@Setter -@Getter -public class GaeaExportQueryParam extends BaseQueryBO implements Serializable{ - - /** - * 文件标题 - */ - private String fileTitle; -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/GaeaExportMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/GaeaExportMapper.java deleted file mode 100644 index df67e390..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/GaeaExportMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.dao; - -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportQueryParam; -import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 导出中心(GaeaExport)Mapper - * - * @author makejava - * @since 2021-02-07 17:12:16 - */ -@Mapper -public interface GaeaExportMapper extends GaeaBaseMapper { - /** - * 导出信息的高级查询 - * @param page - * @param bo - * @param wrapper - * @return - */ - List queryExportInfo(Page page, @Param("bo") GaeaExportQueryParam bo, @Param(Constants.WRAPPER) QueryWrapper wrapper); -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/entity/GaeaExport.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/entity/GaeaExport.java deleted file mode 100644 index 632153fd..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/dao/entity/GaeaExport.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.dao.entity; - -import com.anji.plus.gaea.annotation.Formatter; -import com.baomidou.mybatisplus.annotation.TableName; -import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; - -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * 导出中心(GaeaExport)实体类 - * - * @author peiyanni - * @since 2021-02-07 17:12:14 - */ -@TableName("gaea_export") -public class GaeaExport extends GaeaBaseEntity implements Serializable { - /** - * 文件在t_file中的id,前端传它来读流接口显示,http://auth/file/download/fileId - */ - private String fileId; - /** - * 文件标题,比如:对账单报表6月份报表 - */ - private String fileTitle; - /** - * 导出前,查询的数据开始时间 - */ - private LocalDateTime resultStartTime; - /** - * 导出前,查询的数据结束时间 - */ - private LocalDateTime resultEndTime; - /** - * 导出查询结果,数据总条数 - */ - private Long resultSize; - /** 文件导出触发时间 */ - private LocalDateTime fileCreateTime; - - /** 文件生成完成时间 */ - private LocalDateTime fileFinishTime; - /** - * 文件状态,creating生成中,success生成成功,failed生成失败 - */ - @Formatter(dictCode="FILE_STATUS",targetField = "fileStatus") - private String fileStatus; - /** - * 备注 - */ - private String remark; - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId; - } - - public String getFileTitle() { - return fileTitle; - } - - public void setFileTitle(String fileTitle) { - this.fileTitle = fileTitle; - } - - public LocalDateTime getResultStartTime() { - return resultStartTime; - } - - public LocalDateTime getResultEndTime() { - return resultEndTime; - } - - public LocalDateTime getFileFinishTime() { - return fileFinishTime; - } - - public void setFileFinishTime(LocalDateTime fileFinishTime) { - this.fileFinishTime = fileFinishTime; - } - - public Long getResultSize() { - return resultSize; - } - - public void setResultSize(Long resultSize) { - this.resultSize = resultSize; - } - - public void setResultStartTime(LocalDateTime resultStartTime) { - this.resultStartTime = resultStartTime; - } - - public void setResultEndTime(LocalDateTime resultEndTime) { - this.resultEndTime = resultEndTime; - } - - public LocalDateTime getFileCreateTime() { - return fileCreateTime; - } - - public void setFileCreateTime(LocalDateTime fileCreateTime) { - this.fileCreateTime = fileCreateTime; - } - - public String getFileStatus() { - return fileStatus; - } - - public void setFileStatus(String fileStatus) { - this.fileStatus = fileStatus; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/GaeaExportService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/GaeaExportService.java deleted file mode 100644 index 7d02207e..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/GaeaExportService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.service; - -import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport; -import com.anji.plus.gaea.export.vo.ExportOperation; -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportParam; -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportQueryParam; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.anji.plus.gaea.curd.service.GaeaBaseService; - -/** - * 导出中心(GaeaExport)Service - * - * @author peiyanni - * @since 2021-02-07 17:12:22 - */ -public interface GaeaExportService extends GaeaBaseService { - /** - * 导出中心-高级查询 - * 需要 QueryWrapper 类型的动态参数,用来进行获取组装好的QueryWrapper对象 - * @param queryParam - * @return - */ - Page getExportListPage(GaeaExportQueryParam queryParam, QueryWrapper ...qe); - - /** - * 导出操作,保存导出日志信息到表Gaea_export - * @param exportOperation - * @return - */ - Boolean saveExportLog(ExportOperation exportOperation); -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/impl/GaeaExportServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/impl/GaeaExportServiceImpl.java deleted file mode 100644 index e3fb8e92..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/export/service/impl/GaeaExportServiceImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.export.service.impl; - -import com.anjiplus.template.gaea.business.modules.export.dao.GaeaExportMapper; -import com.anjiplus.template.gaea.business.modules.export.dao.entity.GaeaExport; -import com.anjiplus.template.gaea.business.modules.export.service.GaeaExportService; -import com.anjiplus.template.gaea.business.modules.file.dao.GaeaFileMapper; -import com.anjiplus.template.gaea.business.modules.file.entity.GaeaFile; -import com.anji.plus.gaea.export.vo.ExportOperation; -import com.anjiplus.template.gaea.business.modules.export.controller.param.GaeaExportQueryParam; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.anjiplus.template.gaea.common.aop.GaeaQuery; -import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Date; -import java.util.List; - -/** - * 导出中心(GaeaExport)ServiceImpl - * - * @author makejava - * @since 2021-02-07 17:12:24 - */ -@Service -public class GaeaExportServiceImpl implements GaeaExportService { - @Autowired - private GaeaExportMapper gaeaExportMapper; - @Autowired - private GaeaFileMapper gaeaFileMapper; - - @Override - public GaeaBaseMapper getMapper() { - return gaeaExportMapper; - } - - - @Override - @GaeaQuery - public Page getExportListPage(GaeaExportQueryParam queryParam, QueryWrapper... qe) { - Page page = new Page<>(queryParam.getPageNumber(), queryParam.getPageSize()); - QueryWrapper queryWrapper = (null != qe && qe.length > 0) ? qe[0] : null; - List gaeaExports = gaeaExportMapper.queryExportInfo(page, queryParam, queryWrapper); - page.setRecords(gaeaExports); - return page; - } - - @Override - @Transactional - public Boolean saveExportLog(ExportOperation exportOperation) { - //需要保存两张表数据 gaea_file ,gaea_export数据 - Date nowDate = new Date(); - GaeaFile gaeaFile = new GaeaFile(); - gaeaFile.setFileId(exportOperation.getFileId()); - gaeaFile.setFilePath(exportOperation.getFilePath()); - gaeaFile.setCreateBy(exportOperation.getCreaterUsername()); - gaeaFile.setCreateTime(nowDate); - gaeaFile.setUpdateBy(exportOperation.getCreaterUsername()); - gaeaFile.setUpdateTime(nowDate); - gaeaFileMapper.insert(gaeaFile); - GaeaExport export = new GaeaExport(); - BeanUtils.copyProperties(exportOperation, export); - export.setCreateBy(exportOperation.getCreaterUsername()); - export.setCreateTime(nowDate); - export.setUpdateBy(exportOperation.getCreaterUsername()); - export.setUpdateTime(nowDate); - gaeaExportMapper.insert(export); - return true; - } -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/dto/GaeaFileDTO.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/dto/GaeaFileDTO.java index 649c7f64..86a735cb 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/dto/GaeaFileDTO.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/dto/GaeaFileDTO.java @@ -3,6 +3,7 @@ package com.anjiplus.template.gaea.business.modules.file.controller.dto; import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; /** * (GaeaFile)实体类 @@ -10,58 +11,21 @@ import io.swagger.annotations.ApiModelProperty; * @author peiyanni * @since 2021-02-18 14:48:27 */ -@ApiModel(value = "") +@Data public class GaeaFileDTO extends GaeaBaseDTO { - /** - * 文件uuid - */ + /** 文件标识 */ private String fileId; - /** - * 文件在linux中的完整目录,比如/app/dist/export/excel/${fileid}.xlsx - */ - @ApiModelProperty(value = "文件在linux中的完整目录,比如/app/dist/export/excel/${fileid}.xlsx") - private String filePath; - /** - * 通过接口的下载完整http路径 - */ - @ApiModelProperty(value = "通过接口的下载完整http路径") - private String urlPath; - /** - * 文件内容说明,比如 对账单(202001~202012) - */ - @ApiModelProperty(value = "文件内容说明,比如 对账单(202001~202012)") - private String fileInstruction; - - public String getFilePath() { - return filePath; - } - - public void setFilePath(String filePath) { - this.filePath = filePath; - } - public String getUrlPath() { - return urlPath; - } + /** 文件类型 */ + private String fileType; - public void setUrlPath(String urlPath) { - this.urlPath = urlPath; - } - - public String getFileInstruction() { - return fileInstruction; - } - - public void setFileInstruction(String fileInstruction) { - this.fileInstruction = fileInstruction; - } + /** 文件路径 */ + private String filePath; - public String getFileId() { - return fileId; - } + /** url路径 */ + private String urlPath; - public void setFileId(String fileId) { - this.fileId = fileId; - } + /** 内容说明 */ + private String fileInstruction; } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/param/GaeaFileParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/param/GaeaFileParam.java index 0aa4040b..7d6bd835 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/param/GaeaFileParam.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/controller/param/GaeaFileParam.java @@ -15,17 +15,11 @@ import java.io.Serializable; */ public class GaeaFileParam extends PageParam implements Serializable { - /** - * 文件在linux中的完整目录,比如/app/dist/export/excel/${fileid}.xlsx - */ - @Query(QueryEnum.LIKE) + /** 模糊查询 */ + @Query(value = QueryEnum.LIKE) private String filePath; - public String getFilePath() { - return filePath; - } - - public void setFilePath(String filePath) { - this.filePath = filePath; - } + /** 模糊查询 */ + @Query(value = QueryEnum.EQ) + private String fileType; } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/entity/GaeaFile.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/entity/GaeaFile.java index 38852564..13747600 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/entity/GaeaFile.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/entity/GaeaFile.java @@ -2,6 +2,8 @@ package com.anjiplus.template.gaea.business.modules.file.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import java.io.Serializable; @@ -12,54 +14,21 @@ import java.io.Serializable; * @since 2021-02-18 14:48:20 */ @TableName("gaea_file") +@Data public class GaeaFile extends GaeaBaseEntity implements Serializable { - /** - * 文件uuid - */ + @ApiModelProperty(value = "文件标识") private String fileId; - /** - * 文件在linux中的完整目录,比如/app/dist/export/excel/${fileid}.xlsx - */ - private String filePath; - /** - * 通过接口的下载完整http路径 - */ - private String urlPath; - /** - * 文件内容说明,比如 对账单(202001~202012) - */ - private String fileInstruction; - - public String getFilePath() { - return filePath; - } - - public void setFilePath(String filePath) { - this.filePath = filePath; - } - public String getUrlPath() { - return urlPath; - } + @ApiModelProperty(value = "文件类型") + private String fileType; - public void setUrlPath(String urlPath) { - this.urlPath = urlPath; - } - - public String getFileInstruction() { - return fileInstruction; - } - - public void setFileInstruction(String fileInstruction) { - this.fileInstruction = fileInstruction; - } + @ApiModelProperty(value = "文件路径") + private String filePath; - public String getFileId() { - return fileId; - } + @ApiModelProperty(value = "url路径") + private String urlPath; - public void setFileId(String fileId) { - this.fileId = fileId; - } + @ApiModelProperty(value = "内容说明") + private String fileInstruction; } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/GaeaFileService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/GaeaFileService.java index 6c7f0331..d7321404 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/GaeaFileService.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/GaeaFileService.java @@ -24,7 +24,7 @@ public interface GaeaFileService extends GaeaBaseService getMapper() { @@ -70,15 +66,17 @@ public class GaeaFileServiceImpl implements GaeaFileService { @Override @Transactional(rollbackFor = Exception.class) - public String upload(MultipartFile file) { + public GaeaFile upload(MultipartFile file) { try { String fileName = file.getOriginalFilename(); if (StringUtils.isBlank(fileName)) { throw BusinessExceptionBuilder.build(ResponseCode.FILE_EMPTY_FILENAME); } + String suffixName = fileName.substring(fileName.lastIndexOf(".")); + String fileInstruction = fileName.substring(0, fileName.lastIndexOf(".")); //白名单校验(不区分大小写) - List list = new ArrayList(Arrays.asList(whiteList.split("\\|"))); + List list = new ArrayList<>(Arrays.asList(whiteList.split("\\|"))); list.addAll(list.stream().map(String::toUpperCase).collect(Collectors.toList())); if (!list.contains(suffixName)) { throw BusinessExceptionBuilder.build(ResponseCode.FILE_SUFFIX_UNSUPPORTED); @@ -88,19 +86,25 @@ public class GaeaFileServiceImpl implements GaeaFileService { String newFileName = fileId + suffixName; // 本地文件保存路径 String filePath = dictPath + newFileName; - String urlPath = fileDownloadPath + File.separator + fileId; + String urlPath = fileDownloadPath + java.io.File.separator + fileId; GaeaFile gaeaFile = new GaeaFile(); gaeaFile.setFilePath(filePath); gaeaFile.setFileId(fileId); gaeaFile.setUrlPath(urlPath); + gaeaFile.setFileType(suffixName.replace(".", "")); + gaeaFile.setFileInstruction(fileInstruction); gaeaFileMapper.insert(gaeaFile); //写文件 将文件保存/app/dictPath/upload/下 - File dest = new File(dictPath + newFileName); + java.io.File dest = new java.io.File(dictPath + newFileName); + java.io.File parentFile = dest.getParentFile(); + if (!parentFile.exists()) { + parentFile.mkdirs(); + } file.transferTo(dest); // 将完整的http访问路径返回 - return urlPath; + return gaeaFile; } catch (Exception e) { TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); log.error("file upload error: {}", e); @@ -127,16 +131,7 @@ public class GaeaFileServiceImpl implements GaeaFileService { } String filename = filePath.substring(filePath.lastIndexOf(File.separator)); String fileSuffix = filename.substring(filename.lastIndexOf(".")); - //特殊处理:如果是excel文件,则从t_export表中查询文件名 - List list = Arrays.asList(excelSuffix.split("\\|")); - if (list.contains(fileSuffix)) { - LambdaQueryWrapper exportWrapper = Wrappers.lambdaQuery(); - exportWrapper.eq(GaeaExport::getFileId, fileId); - GaeaExport exportPO = gaeaExportMapper.selectOne(exportWrapper); - if (null != exportPO) { - filename = exportPO.getFileTitle() + fileSuffix; - } - } + //根据文件后缀来判断,是显示图片\视频\音频,还是下载文件 File file = new File(filePath); ResponseEntity.BodyBuilder builder = ResponseEntity.ok(); diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/util/StringPatternUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/util/StringPatternUtil.java new file mode 100644 index 00000000..e8d45e20 --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/util/StringPatternUtil.java @@ -0,0 +1,98 @@ +package com.anjiplus.template.gaea.business.modules.file.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +public class StringPatternUtil { + + + /** + * + *

Discription:[查找源sourceStr中是否包含pattern,返回boolean]

+ * @author + * @update:[日期YYYY-MM-DD] [更改人姓名] + * @param sourceStr + * @param pattern + * @return + */ + public static boolean StringMatch(String sourceStr,String pattern){ + boolean result=false; + try{ + if(StringUtils.isBlank(sourceStr)|| StringUtils.isBlank(pattern)){ + return result; + } + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(sourceStr); + while (m.find()) { + //String aa=m.group(0); + result=true; + break ; + } + + }catch(Exception e){ + result=false; + } + return result; + } + + public static boolean StringMatchIgnoreCase(String sourceStr,String pattern){ + boolean result=false; + try{ + if(StringUtils.isBlank(sourceStr)|| StringUtils.isBlank(pattern)){ + return result; + } + sourceStr=sourceStr.toLowerCase(); + pattern=pattern.toLowerCase(); + result=StringMatch(sourceStr,pattern); + }catch(Exception e){ + result=false; + } + return result; + } + + + + /** + *

Discription:[查找源sourceStr中是否包含pattern,返回找到的字符串,未找到就返回空字符串]

+ * @author + * @update:[日期YYYY-MM-DD] [更改人姓名] + * @param sourceStr + * @param pattern + * @return + */ + public static String StringFind(String sourceStr,String pattern){ + String result=""; + try{ + if(StringUtils.isBlank(sourceStr)|| StringUtils.isBlank(pattern)){ + return result; + } + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(sourceStr); + while (m.find()) { + result = m.group(0); + break; + } + }catch(Exception e){ + result=""; + } + return result; + } + + public static String replace(String sourceStr, String pattern, String replaceStr){ + String result=""; + try{ + if(StringUtils.isBlank(sourceStr)|| StringUtils.isBlank(pattern)){ + return result; + } + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(sourceStr); + result = m.replaceAll(replaceStr); + }catch(Exception e){ + result=""; + } + return result; + } +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/GaeaUiI18nController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/GaeaUiI18nController.java deleted file mode 100644 index 98a8ae72..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/GaeaUiI18nController.java +++ /dev/null @@ -1,100 +0,0 @@ - -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller; - -import com.anji.plus.gaea.annotation.AccessKey; -import com.anji.plus.gaea.bean.ResponseBean; -import com.anji.plus.gaea.curd.service.GaeaBaseService; -import com.anji.plus.gaea.utils.GaeaBeanUtils; -import com.anji.plus.gaea.utils.GaeaUtils; -import com.anjiplus.template.gaea.business.base.BaseController; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller.dto.GaeaUiI18nDto; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller.param.GaeaUiI18nParam; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity.GaeaUiI18n; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.GaeaUiI18nService; - -import io.swagger.annotations.Api; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** -* @desc ui文字国际化处理 controller -* @website https://gitee.com/anji-plus/gaea -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@RestController -@Api(tags = "ui文字国际化处理管理") -@RequestMapping("/gaeaUiI18n") -public class GaeaUiI18nController extends BaseController { - - @Autowired - private GaeaUiI18nService gaeaUiI18nService; - - @Override - public GaeaBaseService getService() { - return gaeaUiI18nService; - } - - @Override - public GaeaUiI18n getEntity() { - return new GaeaUiI18n(); - } - - @Override - public GaeaUiI18nDto getDTO() { - return new GaeaUiI18nDto(); - } - - - @GetMapping({"/{id}"}) - @AccessKey - @Override - public ResponseBean detail(@PathVariable("id") Long id) { - this.logger.info("{}根据ID查询服务开始,id为:{}", this.getClass().getSimpleName(), id); - GaeaUiI18n result = gaeaUiI18nService.getDetail(id); - GaeaUiI18nDto dto = this.getDTO(); - GaeaBeanUtils.copyAndFormatter(result, dto); - ResponseBean responseBean = this.responseSuccessWithData(this.resultDtoHandle(dto)); - this.logger.info("{}根据ID查询结束,结果:{}", this.getClass().getSimpleName(), GaeaUtils.toJSONString(responseBean)); - return responseBean; - } - - @PostMapping(value = "/scan") - public ResponseBean scan(@RequestParam String table){ - gaeaUiI18nService.scan(table); - return responseSuccess(); - } - - @GetMapping(value = "/getTables") - public ResponseBean getTables(){ - List t = gaeaUiI18nService.getUi18nTables(); - return responseSuccessWithData(t); - } - - @PostMapping(value = "/listI18nFields") - public ResponseBean getI18nFields(@RequestBody GaeaUiI18nDto q){ - GaeaUiI18n qry = new GaeaUiI18n(); - GaeaBeanUtils.copyAndFormatter(q,qry); - // 客户端测试时,以前端参数为准 - if(StringUtils.isEmpty(qry.getLocale())) { - qry.setLocale(getI18nLang()); - } - Map ret = new HashMap(); - for(String table : q.getRefer().split(",")) { - qry.setRefer(table); - Map t = gaeaUiI18nService.getI18nFields(qry); - ret.putIfAbsent(qry.getModule(),new HashMap<>()); - // 合并module子节点 - ((Map)ret.get(qry.getModule())).putAll((Map)t.get(qry.getModule())); - } - - ret.put("locale",q.getLocale()); - return responseSuccessWithData(ret); - } - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/dto/GaeaUiI18nDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/dto/GaeaUiI18nDto.java deleted file mode 100644 index 2d5e5dca..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/dto/GaeaUiI18nDto.java +++ /dev/null @@ -1,50 +0,0 @@ - -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller.dto; - -import java.io.Serializable; - -import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; -import com.anji.plus.gaea.annotation.Formatter; -import lombok.Data; -import java.sql.Timestamp; - - -/** -* -* @description ui文字国际化处理 dto -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@Data -public class GaeaUiI18nDto extends GaeaBaseDTO implements Serializable { - /** 语言标识 */ - @Formatter(dictCode = "LOCALE",targetField = "localeCn") - private String locale; - private String localeCn; - - /** 行业标识 */ - @Formatter(dictCode = "SYS_CATA_TYPE",targetField = "cataTypeCn") - private String cataType; - private String cataTypeCn; - - /** 所属系统 */ - private String system; - - /** 所属菜单编号 */ - private String module; - - /** 字段编码 */ - private String code; - - /** 字段名称 */ - private String name; - - /** 业务描述 */ - private String remark; - private String refer; - /** 启用状态 */ - @Formatter(dictCode = "ENABLE_FLAG",targetField = "enabledCn") - private Integer enabled; - private String enabledCn; - -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/param/GaeaUiI18nParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/param/GaeaUiI18nParam.java deleted file mode 100644 index f36d5b7b..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/controller/param/GaeaUiI18nParam.java +++ /dev/null @@ -1,54 +0,0 @@ -/**/ -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller.param; - -import lombok.Data; -import java.io.Serializable; -import com.anji.plus.gaea.annotation.Query; -import com.anji.plus.gaea.constant.QueryEnum; -import com.anji.plus.gaea.curd.params.PageParam; - -import java.util.List; - - -/** -* @desc GaeaUiI18n ui文字国际化处理查询输入类 -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@Data -public class GaeaUiI18nParam extends PageParam implements Serializable{ - - /** 精确查询 */ - @Query - private String locale; - - /** 精确查询 */ - @Query - private String cataType; - - /** 精确查询 */ - @Query - private String system; - - /** 模糊查询 */ - @Query(value = QueryEnum.LIKE) - private String code; - - /** 模糊查询 */ - @Query(value = QueryEnum.LIKE) - private String name; - - /** 模糊查询 */ - @Query(value = QueryEnum.LIKE) - private String remark; - - @Query(value = QueryEnum.EQ) - private String refer; - - @Query(value = QueryEnum.EQ) - private String module; - - /** 精确查询 */ - @Query - private Integer enabled; -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/GaeaUiI18nMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/GaeaUiI18nMapper.java deleted file mode 100644 index 7abfe917..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/GaeaUiI18nMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity.GaeaUiI18n; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.impl.ColumnDesc; - -/** -* GaeaUiI18n Mapper -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@Mapper -public interface GaeaUiI18nMapper extends GaeaBaseMapper { - - /** - * 查询表的定义,字段中文描述等信息 - * @param tableName - * @return - */ - List queryColumns(@Param(value = "tableName") String tableName); - - /** - * 查询项目所有的表名 - * @param s - * @return - */ - List queryTables(@Param(value = "tableName") String s); -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/entity/GaeaUiI18n.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/entity/GaeaUiI18n.java deleted file mode 100644 index 6381e5b2..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/dao/entity/GaeaUiI18n.java +++ /dev/null @@ -1,46 +0,0 @@ - -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity; - -import lombok.Data; -import io.swagger.annotations.ApiModelProperty; - -import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; -import com.baomidou.mybatisplus.annotation.TableName; - -/** -* @description ui文字国际化处理 entity -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@TableName(value="gaea_ui_i18n") -@Data -public class GaeaUiI18n extends GaeaBaseEntity { - @ApiModelProperty(value = "语言标识") - private String locale; - - @ApiModelProperty(value = "行业标识") - private String cataType; - - @ApiModelProperty(value = "所属系统") - private String system; - - @ApiModelProperty(value = "所属模块") - private String module; - - @ApiModelProperty(value = "字段编码") - private String code; - - @ApiModelProperty(value = "字段名称") - private String name; - - @ApiModelProperty(value = "业务描述") - private String remark; - - @ApiModelProperty(value = "关联表名") - private String refer; - - @ApiModelProperty(value = "启用状态") - private Integer enabled; - - -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/GaeaUiI18nService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/GaeaUiI18nService.java deleted file mode 100644 index b9ca6b5a..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/GaeaUiI18nService.java +++ /dev/null @@ -1,46 +0,0 @@ - -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service; - -import com.anjiplus.template.gaea.business.base.BaseService; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity.GaeaUiI18n; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.controller.param.GaeaUiI18nParam; - -import java.util.List; -import java.util.Map; - -/** -* @desc GaeaUiI18n ui文字国际化处理服务接口 -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -public interface GaeaUiI18nService extends BaseService { - - /*** - * 查询详情 - * - * @param id - * @return - */ - GaeaUiI18n getDetail(Long id); - - /** - * 新加功能菜单时,i18n同步、初始化,以单表为单位处理 - * 优先从 自动生成处理表查询,没有则从源表查询,减少重复维护 - * - * @param table 表名称 - */ - void scan(String table); - - /** - * 查询项目所有的表 - * @return - */ - List getUi18nTables(); - - /** - * 菜单初始化时,查询该菜单需要的国际化列表 - * @param initQry - * @return map - */ - Map getI18nFields(GaeaUiI18n initQry); -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/ColumnDesc.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/ColumnDesc.java deleted file mode 100644 index 77d44336..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/ColumnDesc.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.impl; - -import com.anjiplus.template.gaea.generator.domain.Column; - -/** - * @author WongBin - * @date 2021/3/26 - */ -public class ColumnDesc extends Column { - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/GaeaUiI18nServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/GaeaUiI18nServiceImpl.java deleted file mode 100644 index ac49537e..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/gaeaUiI18n/service/impl/GaeaUiI18nServiceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ - -package com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.impl; - -import cn.hutool.core.util.StrUtil; - -import com.anji.plus.gaea.constant.BaseOperationEnum; -import com.anji.plus.gaea.constant.Enabled; -import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; - -import com.anji.plus.gaea.exception.BusinessException; -import com.anjiplus.template.gaea.generator.domain.Column; -import com.anjiplus.template.gaea.generator.service.GeneratorService; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.i18n.LocaleContextHolder; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.entity.GaeaUiI18n; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.service.GaeaUiI18nService; -import com.anjiplus.template.gaea.business.modules.gaeaUiI18n.dao.GaeaUiI18nMapper; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; - -/** -* @desc GaeaUiI18n ui文字国际化处理服务实现 -* @author 王斌 -* @date 2021-03-25 15:30:59.286 -**/ -@Service -@Slf4j -public class GaeaUiI18nServiceImpl implements GaeaUiI18nService { - - @Autowired - private GaeaUiI18nMapper gaeaUiI18nMapper; - - @Override - public GaeaBaseMapper getMapper() { - return gaeaUiI18nMapper; - } - - @Override - public GaeaUiI18n getDetail(Long id) { - GaeaUiI18n gaeaUiI18n = this.selectOne(id); - return gaeaUiI18n; - } - - @Autowired(required = false) - GeneratorService generatorService; - - @Value("${spring.application.name}") - private String applicationName; - - @Override - public void processBeforeOperation(GaeaUiI18n entity, - BaseOperationEnum type) throws BusinessException { - if(BaseOperationEnum.INSERT.equals(type)){ - entity.setSystem(applicationName); - //entity.setCataType(""); - } - } - - @Override - public void scan(String table) { - assert table!=null; - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); - wrapper.eq(GaeaUiI18n::getRefer,table); - if(gaeaUiI18nMapper.selectCount(wrapper) > 0){ - log.warn("{} exist,ignore",table); - throw new BusinessException("6001",new String[]{"该表的字段已维护国际化配置"}); - } - List columnDescList = generatorService.getColumns(table); - //List columnDescList = gaeaUiI18nMapper.queryColumns(table); - if(!CollectionUtils.isEmpty(columnDescList)){ - List list = columnDescList.stream().map(item->{ - if(item.getRemark()!=null && item.getRemark().length()>20){ - item.setRemark(item.getRemark().substring(0,20)); - } - GaeaUiI18n it = new GaeaUiI18n(); - it.setCode(StrUtil.toCamelCase(item.getColumnName())); - it.setName(item.getRemark()); - it.setLocale(getI18nLang()); - it.setSystem(applicationName); - it.setRemark(item.getRemark()); - it.setEnabled(Enabled.YES.getValue()); - it.setRefer(item.getTableName()); - return it; - }).collect(Collectors.toList()); - - int ret = gaeaUiI18nMapper.insertBatch(list); - log.info("insert-batch-for:{},size:{}",table,ret); - } - } - - private String getI18nLang(){ - return LocaleContextHolder.getLocale().getLanguage(); - } - - @Override - public List getUi18nTables() { - return gaeaUiI18nMapper.queryTables(""); - } - - @Override - public Map getI18nFields(GaeaUiI18n q) { - String table = q.getRefer(); - String tableAlias = ""; - // 提取表名称和别名 - if(q.getRefer().contains(":")) { - table = q.getRefer().split(":")[0]; - tableAlias = Optional.ofNullable(q.getRefer().substring(table.length() + 1)).orElse(""); - q.setRefer(table); - } - - LambdaQueryWrapper qry = Wrappers.lambdaQuery(); - qry.eq(GaeaUiI18n::getLocale,q.getLocale()) - .and(t->t.eq(GaeaUiI18n::getEnabled,Enabled.YES.getValue())) - // 所属行业 - .and(t->t.eq(GaeaUiI18n::getCataType,q.getCataType()).or().isNull(GaeaUiI18n::getCataType)) - // 同一个表 或同一个菜单 - .and(t->t.eq(GaeaUiI18n::getRefer,q.getRefer()).or().eq(GaeaUiI18n::getModule,q.getModule())) - ; - List list = gaeaUiI18nMapper.selectList(qry); - - HashMap kv = new HashMap(); - // 表级别 字段默认设置 - list.stream().filter(i->i.getRefer()!=null && i.getCataType()==null).forEach(i->{ - kv.put(i.getCode(),i.getName()); - }); - // 表级别 字段行业属性,覆盖默认设置 - list.stream().filter(i->i.getRefer()!=null && i.getCataType()!=null).forEach(i->{ - kv.put(i.getCode(),i.getName()); - }); - - Map result = new HashMap(); - // 挂载在module根节点 - if(tableAlias.length()<1) { - result.put(q.getModule(), kv); - }else { - // 作为module的子节点 - result.putIfAbsent(q.getModule(),new HashMap<>()); - ((Map)result.get(q.getModule())).put(tableAlias,kv); - } - - // 设置模块级别的字段配置 - HashMap m = new HashMap(); - list.stream().filter(i->i.getRefer()==null && i.getModule().equals(q.getModule())).forEach(item->{ - m.put(item.getCode(),item.getName()); - }); - if(!m.isEmpty()) { - ((Map)result.get(q.getModule())).putAll(m); - } - return result; - } -} \ No newline at end of file diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java index 4963f54c..3295e64c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java @@ -49,7 +49,7 @@ public class ReportExcelServiceImpl implements ReportExcelService { @Autowired private ReportMapper reportMapper; - @Value("${file.dist-path}") + @Value("${file.dist-path:''}") private String dictPath; @Autowired diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/controller/LoginController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/controller/LoginController.java new file mode 100644 index 00000000..405b9f0b --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/controller/LoginController.java @@ -0,0 +1,34 @@ +package com.anjiplus.template.gaea.business.modules.user.controller; + +import com.anji.plus.gaea.bean.ResponseBean; +import com.anjiplus.template.gaea.business.modules.user.dto.GaeaUserDTO; +import com.anjiplus.template.gaea.business.modules.user.service.UserService; +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +/** + * 简单登录 + * Created by raodeming on 2021/6/23. + */ +@RestController +@Api(tags = "用户管理") +public class LoginController { + + @Autowired + private UserService userService; + + + /** + * 简单实现登录 + * @param dto + * @return + */ + @PostMapping({"/login"}) + public ResponseBean login(@RequestBody @Validated GaeaUserDTO dto) { + return ResponseBean.builder().data(userService.login(dto)).build(); + } +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/GaeaUserMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/GaeaUserMapper.java new file mode 100644 index 00000000..e6c3f93d --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/GaeaUserMapper.java @@ -0,0 +1,12 @@ +package com.anjiplus.template.gaea.business.modules.user.dao; + +import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper; +import com.anjiplus.template.gaea.business.modules.user.dao.entity.GaeaUser; +import org.apache.ibatis.annotations.Mapper; + +/** + * Created by raodeming on 2021/6/23. + */ +@Mapper +public interface GaeaUserMapper extends GaeaBaseMapper { +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/entity/GaeaUser.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/entity/GaeaUser.java new file mode 100644 index 00000000..4dcde5e8 --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dao/entity/GaeaUser.java @@ -0,0 +1,23 @@ +package com.anjiplus.template.gaea.business.modules.user.dao.entity; + +import com.anji.plus.gaea.annotation.Unique; +import com.anji.plus.gaea.curd.entity.GaeaBaseEntity; +import lombok.Data; + +import java.io.Serializable; + +/** + * Created by raodeming on 2021/6/23. + */ +@Data +public class GaeaUser extends GaeaBaseEntity implements Serializable { + /** + * 用户名 + */ + private String username; + + /** + * 密码 + */ + private String password; +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dto/GaeaUserDTO.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dto/GaeaUserDTO.java new file mode 100644 index 00000000..f4fc287b --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/dto/GaeaUserDTO.java @@ -0,0 +1,23 @@ +package com.anjiplus.template.gaea.business.modules.user.dto; + +import com.anji.plus.gaea.annotation.Unique; +import com.anji.plus.gaea.curd.dto.GaeaBaseDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + + +@ApiModel(value = "用户表") +@Data +public class GaeaUserDTO extends GaeaBaseDTO { + + @ApiModelProperty(value = "用户登录名") + @NotBlank + private String username; + + @ApiModelProperty(value = "用户密码") + @NotBlank + private String password; +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/UserService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/UserService.java new file mode 100644 index 00000000..9dab0138 --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/UserService.java @@ -0,0 +1,10 @@ +package com.anjiplus.template.gaea.business.modules.user.service; + +import com.anjiplus.template.gaea.business.modules.user.dto.GaeaUserDTO; + +/** + * Created by raodeming on 2021/6/23. + */ +public interface UserService { + Object login(GaeaUserDTO dto); +} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/impl/UserServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/impl/UserServiceImpl.java new file mode 100644 index 00000000..7a44d0c0 --- /dev/null +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/user/service/impl/UserServiceImpl.java @@ -0,0 +1,86 @@ +package com.anjiplus.template.gaea.business.modules.user.service.impl; + +import com.anji.plus.gaea.cache.CacheHelper; +import com.anji.plus.gaea.exception.BusinessExceptionBuilder; +import com.anji.plus.gaea.utils.GaeaUtils; +import com.anji.plus.gaea.utils.JwtBean; +import com.anjiplus.template.gaea.business.code.ResponseCode; +import com.anjiplus.template.gaea.business.modules.user.dao.GaeaUserMapper; +import com.anjiplus.template.gaea.business.modules.user.dao.entity.GaeaUser; +import com.anjiplus.template.gaea.business.modules.user.dto.GaeaUserDTO; +import com.anjiplus.template.gaea.business.modules.user.service.UserService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.google.common.collect.Maps; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.security.MessageDigest; +import java.util.HashMap; +import java.util.Map; + +/** + * Created by raodeming on 2021/6/23. + */ +@Service +public class UserServiceImpl implements UserService { + + @Autowired + private JwtBean jwtBean; + + @Autowired + private GaeaUserMapper gaeaUserMapper; + + @Autowired + private CacheHelper cacheHelper; + + @Override + public Object login(GaeaUserDTO dto) { + + String username = dto.getUsername(); + String password = dto.getPassword(); + //1.判断用户是否存在 + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); + wrapper.eq(GaeaUser::getUsername, username); + GaeaUser gaeaUser = gaeaUserMapper.selectOne(wrapper); + if (null == gaeaUser || !gaeaUser.getPassword().equals(encrypt(password))) { + throw BusinessExceptionBuilder.build(ResponseCode.LOGIN_ERROR); + } + + + Map map = Maps.newHashMap(); + + //将登录信息缓存,默认一小时 + if (cacheHelper.exist(username)) { + map.put("token", cacheHelper.stringGet(username)); + } else { + String uuid = GaeaUtils.UUID(); + String token = jwtBean.createToken(username, uuid); + cacheHelper.stringSetExpire(username, token, 3600); + map.put("token", token); + } + + return map; + } + + /** + * 获取指定字符串的md5值 + * @param dataStr 明文 + * @return String + */ + public static String encrypt(String dataStr) { + try { + MessageDigest m = MessageDigest.getInstance("MD5"); + m.update(dataStr.getBytes("UTF8")); + byte[] s = m.digest(); + StringBuilder result = new StringBuilder(); + for (int i = 0; i < s.length; i++) { + result.append(Integer.toHexString((0x000000FF & s[i]) | 0xFFFFFF00).substring(6)); + } + return result.toString(); + } catch (Exception e) { + e.printStackTrace(); + } + return ""; + } +} diff --git a/report-core/src/main/resources/bootstrap-dev.yml b/report-core/src/main/resources/bootstrap-dev.yml index e606b533..66f057f1 100644 --- a/report-core/src/main/resources/bootstrap-dev.yml +++ b/report-core/src/main/resources/bootstrap-dev.yml @@ -1,16 +1,16 @@ spring: application: name: gaea-business - cloud: - nacos: - server-addr: 10.108.26.121:8848,10.108.26.145:8848 - username: gaea - password: p@ss1234 +# cloud: +# nacos: +# server-addr: 10.108.26.121:8848,10.108.26.145:8848 +# username: gaea +# password: p@ss1234 # config: # namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f # file-extension: yaml - discovery: - namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f +# discovery: +# namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f jackson: date-format: yyyy-MM-dd HH:mm:ss messages: @@ -39,6 +39,11 @@ generator: templatePath: template server: port: 9092 + servlet: + encoding: + charset: UTF-8 + force: true + enabled: true # servlet: # context-path: /business mybatis-plus: diff --git a/report-core/src/main/resources/bootstrap.yml b/report-core/src/main/resources/bootstrap.yml index 0c268749..095bc014 100644 --- a/report-core/src/main/resources/bootstrap.yml +++ b/report-core/src/main/resources/bootstrap.yml @@ -6,4 +6,4 @@ logging: config: classpath:logback.xml generator: tableExclude: - mysql: "AND table_name not like 'gaea_%' AND table_name not like 'ACT_%'" \ No newline at end of file + mysql: "AND table_name not like 'gaea_%' AND table_name not like 'ACT_%'" diff --git a/report-core/src/main/resources/i18n/messages_en_US.properties b/report-core/src/main/resources/i18n/messages_en_US.properties index 35bad51b..702285db 100644 --- a/report-core/src/main/resources/i18n/messages_en_US.properties +++ b/report-core/src/main/resources/i18n/messages_en_US.properties @@ -6,6 +6,9 @@ 2003=File upload failed 2004=File does not exist +login.error=username or password error +User.token.expired=User token has expired + 3001=Template code does not allow duplication 3002=The receiver is not allowed to be empty Insert.failure=Insert failure diff --git a/report-core/src/main/resources/i18n/messages_zh_CN.properties b/report-core/src/main/resources/i18n/messages_zh_CN.properties index 2399eff3..f05c8e55 100644 --- a/report-core/src/main/resources/i18n/messages_zh_CN.properties +++ b/report-core/src/main/resources/i18n/messages_zh_CN.properties @@ -6,6 +6,10 @@ 2003=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25 2004=\u6587\u4EF6\u4E0D\u5B58\u5728 +login.error=\u7528\u6237\u540D\u6216\u8005\u5BC6\u7801\u4E0D\u6B63\u786E +User.token.expired=\u7528\u6237\u672A\u767B\u5F55\u6216\u767B\u5F55\u4FE1\u606F\u8FC7\u671F + + 3001=\u6A21\u677F\u4EE3\u7801\u4E0D\u5141\u8BB8\u91CD\u590D 3002=\u63A5\u6536\u4EBA\u4E0D\u5141\u8BB8\u4E3A\u7A7A Dict.item.code.exist=\u6570\u636E\u5B57\u5178\u9879\u503C\u5DF2\u5B58\u5728 diff --git a/report-core/src/main/resources/mapper/GaeaExportMapper.xml b/report-core/src/main/resources/mapper/GaeaExportMapper.xml deleted file mode 100644 index f9253ece..00000000 --- a/report-core/src/main/resources/mapper/GaeaExportMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - id, file_id, file_title, result_start_time, result_end_time, result_size, file_create_time, file_finish_time, - file_status, create_by, update_by, create_time, update_time, version, remark - - - - - diff --git a/report-core/src/main/resources/mapper/GaeaUiI18nMapper.xml b/report-core/src/main/resources/mapper/GaeaUiI18nMapper.xml deleted file mode 100644 index db8442aa..00000000 --- a/report-core/src/main/resources/mapper/GaeaUiI18nMapper.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - id,locale,cata_type,system,code,name,remark,enabled,create_by,create_time,update_by,update_time,version - - - - - - - \ No newline at end of file