diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java
index ea0ca31624..ea570175ef 100644
--- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java
+++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class AdminApplication {
public static void main(String[] args) {
diff --git a/epmet-auth/src/main/java/com/epmet/AuthApplication.java b/epmet-auth/src/main/java/com/epmet/AuthApplication.java
index 51635f759e..2c14a7792b 100644
--- a/epmet-auth/src/main/java/com/epmet/AuthApplication.java
+++ b/epmet-auth/src/main/java/com/epmet/AuthApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan // 开启Servlet容器扫描,扫描@WebFilter等注解
public class AuthApplication {
public static void main(String[] args) {
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ThreadLocalInitAspect.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ThreadLocalInitAspect.java
index 2e070b1817..7ac89e63fc 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ThreadLocalInitAspect.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ThreadLocalInitAspect.java
@@ -1,45 +1,45 @@
-/**
- * Copyright (c) 2018 人人开源 All rights reserved.
- *
- * https://www.renren.io
- *
- * 版权所有,侵权必究!
- */
-
-package com.epmet.commons.tools.aspect;
-
-import com.epmet.commons.tools.constant.ThreadLocalConstant;
-import com.epmet.commons.tools.dto.form.LoginUserInfoResultDTO;
-import com.epmet.commons.tools.exception.ExceptionUtils;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-
-/**
- * 每次请求,清理ThreadLocal线程中的变量
- * @Author wxz
- * @Description
- * @Date 2020/4/23 16:16
- **/
-@Aspect
-@Component
-@Order(1)
-public class ThreadLocalInitAspect {
-
- private static final Logger log = LoggerFactory.getLogger(ThreadLocalInitAspect.class);
-
- @Before(value = "execution(* com.epmet.controller.*Controller*.*(..)) ")
- public void before(JoinPoint point) throws Throwable {
- // 清理权限过滤中的变量残留
- try {
- ThreadLocalConstant.sqlFilter.remove();
- ThreadLocalConstant.requirePermissionTl.remove();
- } catch (Exception e) {
- log.error("清理sqlFilter缓存失败:{}", ExceptionUtils.getErrorStackTrace(e));
- }
- }
-}
+///**
+// * Copyright (c) 2018 人人开源 All rights reserved.
+// *
+// * https://www.renren.io
+// *
+// * 版权所有,侵权必究!
+// */
+//
+//package com.epmet.commons.tools.aspect;
+//
+//import com.epmet.commons.tools.constant.ThreadLocalConstant;
+//import com.epmet.commons.tools.dto.form.LoginUserInfoResultDTO;
+//import com.epmet.commons.tools.exception.ExceptionUtils;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Before;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.core.annotation.Order;
+//import org.springframework.stereotype.Component;
+//
+///**
+// * 每次请求,清理ThreadLocal线程中的变量(已废弃,改用GlobalFilter)
+// * @Author wxz
+// * @Description
+// * @Date 2020/4/23 16:16
+// **/
+//@Aspect
+//@Component
+//@Order(1)
+//public class ThreadLocalInitAspect {
+//
+// private static final Logger log = LoggerFactory.getLogger(ThreadLocalInitAspect.class);
+//
+// @Before(value = "execution(* com.epmet.controller.*Controller*.*(..)) ")
+// public void before(JoinPoint point) throws Throwable {
+// // 清理权限过滤中的变量残留
+// try {
+// ThreadLocalConstant.sqlFilter.remove();
+// ThreadLocalConstant.requirePermissionTl.remove();
+// } catch (Exception e) {
+// log.error("清理sqlFilter缓存失败:{}", ExceptionUtils.getErrorStackTrace(e));
+// }
+// }
+//}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
index 8c8fd0dab3..831913de5e 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
@@ -126,6 +126,12 @@ public enum RequirePermissionEnum {
WORK_PARTY_VOICE_EDIT("work_party_voice_edit", "党建声音:重新编辑", ""),
WORK_PARTY_VOICE_OFFLINE("work_party_voice_offline", "党建声音:下线文章", ""),
WORK_PARTY_VOICE_OPERATION_LIST("work_party_voice_operation_list","党建声音:查看文章操作记录",""),
+ /**
+ * 党务工作-专题管理
+ */
+ WORK_SPECIAL_PROJECT_ENTRANCE("work_special_project_entrance","专题管理:功能入口图标","专题管理:图标入口"),
+ WORK_SPECIAL_PROJECT_ADD("work_special_project_add","专题管理:新增专题","专题管理:新增专题"),
+ WORK_SPECIAL_PROJECT_DEL("work_special_project_del","专题管理:移除专题","专题管理:移除专题"),
/**
* 基层治理-支部管理
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/GlobalFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/GlobalFilter.java
new file mode 100644
index 0000000000..fe3dc8a3e9
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/GlobalFilter.java
@@ -0,0 +1,30 @@
+package com.epmet.commons.tools.filter;
+
+import com.epmet.commons.tools.constant.ThreadLocalConstant;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import java.io.IOException;
+
+/**
+ * @Description 全局过滤器,可在请求结束的时候清除线程变量残留
+ * @author wxz
+ * @date 2021.07.19 10:19:24
+*/
+@WebFilter(value = "/*")
+public class GlobalFilter implements Filter {
+
+ @Override
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+ try {
+ filterChain.doFilter(servletRequest, servletResponse);
+ } catch (Throwable e) {
+ throw e;
+ } finally {
+ // 清除线程变量残留
+ ThreadLocalConstant.sqlFilter.remove();
+ ThreadLocalConstant.requirePermissionTl.remove();
+ ThreadLocalConstant.requestParam.remove();
+ }
+ }
+}
\ No newline at end of file
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
index 81b6807704..308bcfb541 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
@@ -228,7 +228,11 @@ public class RedisKeys {
* @return
*/
public static String getCustomerReTagKey(String customerId,String tagId) {
- return rootPrefix.concat("tags:customer:relationTag:").concat(customerId).concat(StrConstant.COLON).concat(tagId);
+ String reTagKey = rootPrefix.concat("tags:customer:relationTag:").concat(customerId);
+ if (StringUtils.isNotBlank(tagId)){
+ reTagKey = reTagKey.concat(StrConstant.COLON).concat(tagId);
+ }
+ return reTagKey;
}
/**
@@ -247,7 +251,11 @@ public class RedisKeys {
* @return
*/
public static String getGridReTagKey(String gridId,String tagId) {
- return rootPrefix.concat("tags:grid:relationTag:").concat(gridId).concat(StrConstant.COLON).concat(tagId);
+ String gridReTagKey = rootPrefix.concat("tags:grid:relationTag:").concat(gridId);
+ if (StringUtils.isNotBlank(tagId)){
+ gridReTagKey = gridReTagKey.concat(StrConstant.COLON).concat(tagId);
+ }
+ return gridReTagKey;
}
/**
diff --git a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java
index 5c8d111813..5a86194ea7 100644
--- a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java
+++ b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java
@@ -11,6 +11,7 @@ package com.epmet;
import com.epmet.commons.tools.aspect.ServletExceptionHandler;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
@@ -25,6 +26,7 @@ import org.springframework.context.annotation.FilterType;
@SpringBootApplication()
@EnableDiscoveryClient
@EnableFeignClients
+//@ServletComponentScan
@ComponentScan(basePackages = {"com.epmet.*"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {ServletExceptionHandler.class}))
public class GatewayApplication {
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java
index 791cf0b415..5e8d7c4788 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java
@@ -3,12 +3,14 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication(scanBasePackages = {"com.epmet"}, exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class DataAggregatorApplication {
public static void main(String[] args) {
SpringApplication.run(DataAggregatorApplication.class, args);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
index cee0ed9096..3fccfa8b6e 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -10,6 +11,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
+@ServletComponentScan
public class DataReportApplication {
public static void main(String[] args) {
SpringApplication.run(DataReportApplication.class, args);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
index 3b93ce39a3..4a572b4889 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
@@ -3,6 +3,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -11,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableFeignClients
@SpringBootApplication (exclude = {DataSourceAutoConfiguration.class})
@EnableAsync
+@ServletComponentScan
public class DataStatsApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java
index e449ae4050..46ee097f8d 100644
--- a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java
+++ b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -25,6 +26,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
})
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ActivitiApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java
index 238b8546d4..486ac4bf21 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class EpmetCommonServiceApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java
index ac5ed4ffda..5e83208c30 100644
--- a/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java
+++ b/epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class DemoApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java
index 89508e7873..04b9410c8b 100644
--- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java
+++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java
@@ -2,12 +2,14 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class EpmetExtApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java
index 39fd7584e1..c7969a259b 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class EpmetHeartApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java
index c62390ee4e..5f4ba905ef 100644
--- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java
+++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class JobApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java
index 98e4151ead..c32da6dd8a 100644
--- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class MessageApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java
index 28573fb3ea..3600e58cd3 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class OssApplication {
public static void main(String[] args) {
diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java
index 4b8eeb035d..e2925628ba 100644
--- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java
+++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -14,6 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class EpmetPointApplication {
public static void main(String[] args) {
SpringApplication.run(EpmetPointApplication.class, args);
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java
index 2aba843b3f..f2072e4efc 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java
@@ -2,12 +2,14 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class EpmetThirdApplication {
public static void main(String[] args) {
diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml
index d1052635a9..909b706005 100644
--- a/epmet-module/gov-access/gov-access-server/pom.xml
+++ b/epmet-module/gov-access/gov-access-server/pom.xml
@@ -127,6 +127,10 @@
false
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4
+ SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd
@@ -160,6 +164,10 @@
false
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4
+ SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd
@@ -193,6 +201,10 @@
true
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4
+ SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd
@@ -223,6 +235,10 @@
true
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
+ SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java
index 469de9dc52..6068061b0b 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -12,6 +13,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
//@EnableConfigurationProperties(value = {DatabaseProperties.class})
public class GovAccessApplication {
public static void main(String[] args) {
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
index b8ab2dbda6..b18beb3aab 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
@@ -1,12 +1,11 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.ExternalRequestAuth;
+import com.epmet.commons.tools.exception.RenException;
import com.epmet.service.TestService;
+import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("test")
@@ -16,10 +15,17 @@ public class TestController {
private TestService testService;
@ExternalRequestAuth
- @GetMapping("test")
- public void test() {
- System.out.println("TestController -> test()");
+ @PostMapping("test")
+ public void test(@RequestBody Input input) {
+ if (true) {
+ throw new RenException("测试报错");
+ }
testService.test();
}
+ @Data
+ public static class Input {
+ private String name;
+ }
+
}
diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml
index d2038e569e..978f85db31 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml
@@ -124,3 +124,8 @@ pagehelper:
logging:
level:
com.epmet: debug
+
+dingTalk:
+ robot:
+ webHook: @dingTalk.robot.webHook@
+ secret: @dingTalk.robot.secret@
\ No newline at end of file
diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml
index 45b1ddc4e0..c53f4711fe 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml
+++ b/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml
@@ -6,6 +6,9 @@
+
+
+
${appname}
@@ -125,16 +128,25 @@
15
-
-
+
+
ERROR
ACCEPT
DENY
+ ${webHook}
+ ${secret}
+ ${appname}
+
+
-
+
diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java
index ac047e4a68..875c62f1eb 100644
--- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java
+++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -14,6 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class GovGridApplication {
public static void main(String[] args) {
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java
index 36764f5de8..ef94eca399 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class GovIssueApplication {
public static void main(String[] args) {
SpringApplication.run(GovIssueApplication.class, args);
diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java
index f804c3926e..5dad0a50c8 100644
--- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java
+++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java
@@ -2,12 +2,14 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class GovMineApplication {
public static void main(String[] args) {
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateTagFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateTagFormDTO.java
index d2000b366f..96b7f73fa2 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateTagFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateTagFormDTO.java
@@ -25,6 +25,11 @@ public class UpdateTagFormDTO implements Serializable {
*/
private String tagName;
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
+
/**
* 使用计数
*/
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java
index d4cafe7020..ff43e6542c 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class GovOrgApplication {
public static void main(String[] args) {
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java
index ad4410f584..37c767c4b3 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class GovProjectApplication {
public static void main(String[] args) {
SpringApplication.run(GovProjectApplication.class, args);
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagsFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagsFormDTO.java
index ded8bc1f43..13d14e5fef 100644
--- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagsFormDTO.java
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagsFormDTO.java
@@ -3,7 +3,6 @@ package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
-import java.util.Date;
/**
* @Author zxc
@@ -29,6 +28,11 @@ public class InitTagsFormDTO implements Serializable {
*/
private String tagName;
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
+
/**
* 使用计数
*/
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/TagInfoResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/TagInfoResultDTO.java
index a547af8767..1c63a56c9f 100644
--- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/TagInfoResultDTO.java
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/TagInfoResultDTO.java
@@ -24,4 +24,9 @@ public class TagInfoResultDTO implements Serializable {
* 标签名称
*/
private String tagName;
+
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
}
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
index fba5e29854..2e282b17e5 100644
--- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
@@ -31,4 +31,9 @@ public class UpdateTagUseCountsResultDTO implements Serializable {
* 标签名称
*/
private String tagName;
+
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
}
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
index d82e148a93..823ecbed6a 100644
--- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
@@ -23,6 +23,11 @@ public class WorkSpecialSubjectResultDTO implements Serializable {
*/
private String tagName;
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
+
/**
* true代表可以删除。false不可删除,隐藏减号
*/
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
index b42c0088d1..630690be40 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -14,6 +15,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
+@ServletComponentScan
public class GovVoiceApplication {
public static void main(String[] args) {
SpringApplication.run(GovVoiceApplication.class, args);
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
index 7495fb6561..d81affca3a 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
@@ -22,7 +22,6 @@ import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto;
-import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
@@ -40,7 +39,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import java.util.HashMap;
import java.util.List;
@@ -251,14 +249,14 @@ public class ArticleController {
log.error("scanContent draftId:{} return result null", draftId);
}
- if (syncScanResult.isAllPass()) {
+ if (syncScanResult != null && syncScanResult.isAllPass()) {
articleService.scanAllPassPublishArticle(tokenDto, draftId, syncScanResult);
} else {
articleService.updateAuditStatusFailById(draftId, syncScanResult);
}
} catch (Exception e) {
articleService.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
- log.error("scanContent exception draftId:{} return result null", e);
+ log.error("scanContent exception return result null", e);
}
}
@@ -404,4 +402,4 @@ public class ArticleController {
return new Result>().ok(articleService.subjectList(formDTO));
}
-}
\ No newline at end of file
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
index 315a0e54cf..1a55bdf7e6 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
@@ -18,6 +18,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.annotation.RequirePermission;
+import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@@ -56,6 +58,7 @@ public class SpecialSubjectController {
* @description 添加专题
* @Date 2021/7/15 15:31
**/
+ @RequirePermission(requirePermission = RequirePermissionEnum.WORK_SPECIAL_PROJECT_ADD)
@PostMapping("add")
public Result addSpecialSubject(@LoginUser TokenDto tokenDto, @RequestBody AddSpecialSubjectFormDTO formDTO) {
formDTO.setAddUserId(tokenDto.getUserId());
@@ -71,6 +74,7 @@ public class SpecialSubjectController {
* @description 【专题管理】删除专题
* @Date 2021/7/15 20:49
**/
+ @RequirePermission(requirePermission = RequirePermissionEnum.WORK_SPECIAL_PROJECT_DEL)
@PostMapping("del")
public Result delSpecialSubject(@LoginUser TokenDto tokenDto, @RequestBody DelSpecialSubjectFormDTO formDTO){
formDTO.setUserId(tokenDto.getUserId());
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
index edcc5ec3b5..595f2a9a18 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
@@ -40,7 +40,7 @@ public interface TagCustomerDao extends BaseDao {
* @param formDTO
* @author zxc
*/
- void upsertTagCount(UpdateTagFormDTO formDTO);
+ void upsertTagCount(UpdateTagFormDTO formDTO);
/**
* @Description 初始化默认标签
@@ -55,4 +55,4 @@ public interface TagCustomerDao extends BaseDao {
* @return
*/
List selectInitData(@Param("customerIdList") List customerIdList);
-}
\ No newline at end of file
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/TagCustomerEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/TagCustomerEntity.java
index 878b9e05e5..7a2a54d7ae 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/TagCustomerEntity.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/TagCustomerEntity.java
@@ -18,13 +18,10 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
-
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
-import java.util.Date;
-
/**
* 客户标签表
*
@@ -48,6 +45,11 @@ public class TagCustomerEntity extends BaseEpmetEntity {
*/
private String tagName;
+ /**
+ * 标签颜色
+ */
+ private String tagColor;
+
/**
* 使用计数
*/
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
index c8657af1a5..fcf736da02 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
@@ -282,7 +282,7 @@ public class TagRedis {
}
});
}
-
+
/**
* @Description set 更新标签级联
* @param key
@@ -305,6 +305,30 @@ public class TagRedis {
}
}
+ /**
+ * desc: 根据Key删除 缓存
+ *
+ * @param customerId
+ * @return java.lang.Boolean
+ * @author LiuJanJun
+ * @date 2021/7/19 1:34 下午
+ */
+ public void clearCustomerTag(String customerId) {
+ String customerTagKey = RedisKeys.getCustomerTagKey(customerId);
+ Boolean delete = redisTemplate.delete(customerTagKey);
+ log.info("clearCustomerTag result:{}, customerRankingTagKey:{}",delete, customerTagKey);
+ String customerReTagKey = RedisKeys.getCustomerReTagKey(customerId, null).concat(":*");
+ delete = redisTemplate.delete(customerReTagKey);
+ log.info("clearCustomerTag result:{}, customerReTagKey:{}",delete, customerReTagKey);
+ }
-}
\ No newline at end of file
+ public void clearGridTag(String gridId) {
+ String gridTagKey = RedisKeys.getGridTagKey(gridId);
+ Boolean delete = redisTemplate.delete(gridTagKey);
+ log.info("clearGridTag result:{}, gridRankingTagKey:{}",delete, gridTagKey);
+ String gridReTagKey = RedisKeys.getGridReTagKey(gridId, null).concat(":*");
+ delete = redisTemplate.delete(gridReTagKey);
+ log.info("clearGridTag result:{}, gridReTagKey:{}",delete, gridReTagKey);
+ }
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
index d4bacc8197..b2b12d5966 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
@@ -1105,7 +1105,7 @@ public class ArticleServiceImpl extends BaseServiceImpl failDataIds = syncScanResult.getFailDataIds();
for (String id : failDataIds) {
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) {
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java
index 58ece05108..b5c69d76c1 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java
@@ -29,6 +29,7 @@ import com.epmet.dto.form.UpdateTagFormDTO;
import com.epmet.dto.result.UpdateTagUseCountsResultDTO;
import com.epmet.entity.TagCustomerEntity;
import com.epmet.service.TagCustomerService;
+import com.epmet.utils.TagColorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -114,11 +115,15 @@ public class TagCustomerServiceImpl extends BaseServiceImpl>> customerTag = new HashMap<>();
- customerTagList.stream().forEach(tag -> {
- buildZset(customerTag, tag.getCustomerId(), tag.getId(), tag.getTagName(), tag.getUseCount());
+ customerTagList.forEach(tag -> {
+ buildZset(customerTag, tag.getCustomerId(), tag.getId(), tag.getTagName(),tag.getTagColor(), tag.getUseCount());
});
if (customerTag.size() > 0) {
- customerTag.forEach((customerId, tagSet) -> tagRedis.zAddCustomerTag(customerId, tagSet));
+ customerTag.forEach((customerId, tagSet) -> {
+ //先删除(排行及关联标签) 再添加
+ tagRedis.clearCustomerTag(customerId);
+ tagRedis.zAddCustomerTag(customerId, tagSet);
+ });
}
//key customerId:tagId
Map> reCustomerTagMap = new HashMap<>();
@@ -172,9 +176,13 @@ public class TagServiceImpl implements TagService {
throw new RenException("网格标签数为空");
}
customerTag.clear();
- gridTagList.stream().forEach(tag -> buildZset(customerTag, tag.getGridId(), tag.getTagId(), tag.getTagName(), tag.getUseCount()));
+ gridTagList.forEach(tag -> buildZset(customerTag, tag.getGridId(), tag.getTagId(), tag.getTagName(), null, tag.getUseCount()));
if (customerTag.size() > 0) {
- customerTag.forEach((gridId, tagSet) -> tagRedis.zAddGridTag(gridId, tagSet));
+ customerTag.forEach((gridId, tagSet) -> {
+ //先删除(排行及关联标签) 再添加
+ tagRedis.clearGridTag(gridId);
+ tagRedis.zAddGridTag(gridId, tagSet);
+ });
}
//获取网格发布的文章 按网格排序
@@ -236,7 +244,7 @@ public class TagServiceImpl implements TagService {
});
}
- private void buildZset(Map>> customerTag, String customerId, String id, String tagName, Integer useCount) {
+ private void buildZset(Map>> customerTag, String customerId, String id, String tagName, String tagColor, Integer useCount) {
Set> typedTupleSet = customerTag.get(customerId);
if (typedTupleSet == null) {
typedTupleSet = new HashSet<>();
@@ -245,7 +253,8 @@ public class TagServiceImpl implements TagService {
UpdateTagUseCountsResultDTO initTag = new UpdateTagUseCountsResultDTO();
initTag.setTagId(id);
initTag.setTagName(tagName);
+ initTag.setTagColor(tagColor);
ZSetOperations.TypedTuple typedTuple1 = new DefaultTypedTuple<>(initTag, Double.valueOf(useCount));
typedTupleSet.add(typedTuple1);
}
-}
\ No newline at end of file
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/TagColorUtils.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/TagColorUtils.java
new file mode 100644
index 0000000000..ce1e289f31
--- /dev/null
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/TagColorUtils.java
@@ -0,0 +1,28 @@
+package com.epmet.utils;
+
+import java.util.Random;
+
+/**
+ * desc:标签颜色工具类
+ *
+ * @author: LiuJanJun
+ * @date: 2021/7/19 10:39 上午
+ * @version: 1.0
+ */
+public class TagColorUtils {
+ private static final String[] tagColorArr = {"#E3271C","#FB7900","#FFC100","#0089FF","#17B886"};
+
+ /**
+ * desc: 随机获取标签颜色
+ *
+ * @param
+ * @return java.lang.String
+ * @author LiuJanJun
+ * @date 2021/7/19 2:38 下午
+ */
+ public static String getRandomColor(){
+ int size = tagColorArr.length;
+ int index = new Random().nextInt(size);
+ return tagColorArr[index];
+ }
+}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml
index 706460004d..4cd83f8b3a 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml
@@ -11,7 +11,8 @@
-
\ No newline at end of file
+
diff --git a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java
index 6656d79909..4f8a0d8279 100644
--- a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java
+++ b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -14,6 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class OperAccessApplication {
public static void main(String[] args) {
SpringApplication.run(OperAccessApplication.class, args);
diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java
index e0217c141d..37d5036585 100644
--- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java
+++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class OperCrmApplication {
public static void main(String[] args) {
diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java
index ebd25952d0..d69216a53d 100644
--- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java
+++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class OperCustomizeApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java
index b87b17770f..0976927df0 100644
--- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiGroupApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java
index f0c424d76a..204b468868 100644
--- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java
+++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiGuideApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java
index 83139e9255..c8d91862ce 100644
--- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java
+++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -14,6 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiHallApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java
index 9c7e8f6a66..43f8938fc8 100644
--- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java
+++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -14,6 +15,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiHomeApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java
index a8e461d66a..f179e70961 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiMineApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java
index b5fe00951d..57a43e6f1f 100644
--- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java
+++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -22,6 +23,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiPartyMemberApplication {
public static void main(String[] args) {
diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java
index 27d6017d9a..8dcdc0c704 100644
--- a/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java
+++ b/epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java
@@ -2,6 +2,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class ResiVoiceApplication {
public static void main(String[] args) {
SpringApplication.run(ResiVoiceApplication.class, args);
diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java
index 38f55211d2..7b088fe970 100644
--- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java
+++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java
@@ -10,6 +10,7 @@ package com.epmet.openapi.scan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
/**
@@ -21,6 +22,7 @@ import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan(basePackages = "com.epmet")
+@ServletComponentScan
public class ScanApplication {
public static void main(String[] args) {
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java
index 8f8e583add..106c49d028 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java
@@ -10,6 +10,7 @@ package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -23,6 +24,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
+@ServletComponentScan
public class UserApplication {
public static void main(String[] args) {