diff --git a/pom.xml b/pom.xml index 798ce214..328e46eb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ - 2.0.0-SNAPSHOT + 6.0.0-SNAPSHOT 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT 1.0.0-SNAPSHOT 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 index 707c4bf1..dd9e186b 100644 --- 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 @@ -36,7 +36,9 @@ public class TokenFilter implements Filter { HttpServletResponse response = (HttpServletResponse) servletResponse; String uri = request.getRequestURI(); - if (!uri.startsWith("/login")) { + if (!uri.startsWith("/login") + && !uri.startsWith("/static") + && !uri.contains("index.html")) { //获取token String authorization = request.getHeader("Authorization"); @@ -68,7 +70,7 @@ public class TokenFilter implements Filter { } private void error(HttpServletResponse response) throws IOException { - ResponseBean responseBean = ResponseBean.builder().code("500").message("The Token has expired").build(); + ResponseBean responseBean = ResponseBean.builder().code("50014").message("The Token has expired").build(); response.getWriter().print(JSONObject.toJSONString(responseBean)); } } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java index 68123524..30518bac 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/controller/dto/ReportDashboardDto.java @@ -35,6 +35,8 @@ public class ReportDashboardDto extends GaeaBaseDTO implements Serializable { /** 背景图片 */ private String backgroundImage; + private String previewImage; + /** 工作台中的辅助线 */ private String presetLine; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java index bf89396e..960e0f9c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/dao/entity/ReportDashboard.java @@ -35,6 +35,9 @@ public class ReportDashboard extends GaeaBaseEntity { @ApiModelProperty(value = "背景图片") private String backgroundImage; + @ApiModelProperty(value = "列表缩略图") + private String previewImage; + @ApiModelProperty(value = "工作台中的辅助线") private String presetLine; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java index c9f4999e..de232e15 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboard/service/impl/ReportDashboardServiceImpl.java @@ -88,6 +88,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi analysisData(value); reportDashboardWidgetDto.setType(reportDashboardWidget.getType()); reportDashboardWidgetDto.setValue(value); + reportDashboardWidgetDto.setOptions(JSONObject.parseObject(reportDashboardWidget.getOptions())); reportDashboardWidgetDtoList.add(reportDashboardWidgetDto); }); reportDashboardDto.setWidgets(reportDashboardWidgetDtoList); @@ -138,6 +139,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi reportDashboardWidget.setData(value.getData() != null ? JSONObject.toJSONString(value.getData()) : ""); reportDashboardWidget.setPosition(value.getPosition() != null ? JSONObject.toJSONString(value.getPosition()) : ""); reportDashboardWidget.setCollapse(value.getCollapse() != null ? JSONObject.toJSONString(value.getCollapse()) : ""); + reportDashboardWidget.setOptions(reportDashboardWidgetDto.getOptions() != null ? JSONObject.toJSONString(reportDashboardWidgetDto.getOptions()) : ""); reportDashboardWidget.setEnableFlag(1); reportDashboardWidget.setDeleteFlag(0); reportDashboardWidget.setSort((long) (i + 1)); diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java index ed976930..a8538c2c 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetDto.java @@ -1,6 +1,7 @@ package com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto; +import com.alibaba.fastjson.JSONObject; import lombok.Data; import java.io.Serializable; @@ -25,4 +26,9 @@ public class ReportDashboardWidgetDto implements Serializable { */ private ReportDashboardWidgetValueDto value; + /** + * options + */ + private JSONObject options; + } diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java index 805368be..51b660a2 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/controller/dto/ReportDashboardWidgetValueDto.java @@ -9,7 +9,7 @@ import java.io.Serializable; /** * -* @description 大屏看板数据渲染 dto +* @description 大屏看板数据渲染 dto,已弃用 * @author Raod * @date 2021-04-12 15:12:43.724 **/ @@ -30,6 +30,11 @@ public class ReportDashboardWidgetValueDto implements Serializable { /** 组件的大小位置属性json */ private JSONObject position; + private String options; + + /** 自动刷新间隔秒 */ + private Integer refreshSeconds; + /** 0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG */ private Integer enableFlag; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java index a0161db5..671da4f3 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dashboardwidget/dao/entity/ReportDashboardWidget.java @@ -32,6 +32,11 @@ public class ReportDashboardWidget extends GaeaBaseEntity { @ApiModelProperty(value = "组件的大小位置属性json") private String position; + private String options; + + @ApiModelProperty(value = "自动刷新间隔秒") + private Integer refreshSeconds; + @ApiModelProperty(value = "0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG") private Integer enableFlag; diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dict/service/impl/GaeaDictServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dict/service/impl/GaeaDictServiceImpl.java index 640b3b59..9f04750e 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dict/service/impl/GaeaDictServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dict/service/impl/GaeaDictServiceImpl.java @@ -124,6 +124,7 @@ public class GaeaDictServiceImpl implements GaeaDictService { public List findItems(List dictCodes) { LambdaQueryWrapper gaeaDictItemQueryWrapper = Wrappers.lambdaQuery(); + gaeaDictItemQueryWrapper.eq(GaeaDictItem::getEnabled, Enabled.YES.getValue()); if (!CollectionUtils.isEmpty(dictCodes)) { gaeaDictItemQueryWrapper.in(GaeaDictItem::getDictCode, dictCodes); } diff --git a/report-core/src/main/resources/bootstrap-dev.yml b/report-core/src/main/resources/bootstrap-dev.yml index ab6af5ab..153061d4 100644 --- a/report-core/src/main/resources/bootstrap-dev.yml +++ b/report-core/src/main/resources/bootstrap-dev.yml @@ -10,7 +10,7 @@ server: spring: application: name: aj-report -# cloud: + # cloud: # nacos: # server-addr: 10.108.26.121:8848,10.108.26.145:8848 # username: gaea diff --git a/report-core/src/main/resources/mapper/ReportDashboardMapper.xml b/report-core/src/main/resources/mapper/ReportDashboardMapper.xml index 8fb4c3c6..f29f6029 100644 --- a/report-core/src/main/resources/mapper/ReportDashboardMapper.xml +++ b/report-core/src/main/resources/mapper/ReportDashboardMapper.xml @@ -10,6 +10,7 @@ + diff --git a/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml b/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml index 891f2b02..8a98fecc 100644 --- a/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml +++ b/report-core/src/main/resources/mapper/ReportDashboardWidgetMapper.xml @@ -10,6 +10,7 @@ +