Browse Source

Merge branch 'develop' of http://git.elinkit.com.cn:7070/r/epmet-cloud into release_temp

master
jianjun 4 years ago
parent
commit
549fb75529
  1. 2
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/AdminApplication.java
  2. 2
      epmet-auth/src/main/java/com/epmet/AuthApplication.java
  3. 90
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ThreadLocalInitAspect.java
  4. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  5. 30
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/GlobalFilter.java
  6. 12
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  7. 2
      epmet-gateway/src/main/java/com/epmet/GatewayApplication.java
  8. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/DataAggregatorApplication.java
  9. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
  10. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
  11. 2
      epmet-module/epmet-activiti/epmet-activiti-server/src/main/java/com/epmet/ActivitiApplication.java
  12. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/EpmetCommonServiceApplication.java
  13. 2
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/DemoApplication.java
  14. 2
      epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/EpmetExtApplication.java
  15. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/EpmetHeartApplication.java
  16. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/JobApplication.java
  17. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/MessageApplication.java
  18. 2
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/OssApplication.java
  19. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/EpmetPointApplication.java
  20. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java
  21. 16
      epmet-module/gov-access/gov-access-server/pom.xml
  22. 2
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java
  23. 20
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
  24. 5
      epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml
  25. 18
      epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml
  26. 2
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/GovGridApplication.java
  27. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/GovIssueApplication.java
  28. 2
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/GovMineApplication.java
  29. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateTagFormDTO.java
  30. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/GovOrgApplication.java
  31. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/GovProjectApplication.java
  32. 6
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagsFormDTO.java
  33. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/TagInfoResultDTO.java
  34. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
  35. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java
  36. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
  37. 8
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  38. 4
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java
  39. 4
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
  40. 8
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/TagCustomerEntity.java
  41. 28
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
  42. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  43. 11
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagCustomerServiceImpl.java
  44. 23
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagServiceImpl.java
  45. 28
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/TagColorUtils.java
  46. 3
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml
  47. 10
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/TagCustomerDao.xml
  48. 2
      epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/OperAccessApplication.java
  49. 2
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/OperCrmApplication.java
  50. 2
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/OperCustomizeApplication.java
  51. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/ResiGroupApplication.java
  52. 2
      epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/ResiGuideApplication.java
  53. 2
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/ResiHallApplication.java
  54. 2
      epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/ResiHomeApplication.java
  55. 2
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/ResiMineApplication.java
  56. 2
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/ResiPartyMemberApplication.java
  57. 2
      epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/ResiVoiceApplication.java
  58. 2
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/ScanApplication.java
  59. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/UserApplication.java

2
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) {

2
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) {

90
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.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
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.
// * <p>
// * https://www.renren.io
// * <p>
// * 版权所有,侵权必究!
// */
//
//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));
// }
// }
//}

6
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","专题管理:移除专题","专题管理:移除专题"),
/**
* 基层治理-支部管理

30
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();
}
}
}

12
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;
}
/**

2
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 {

2
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);

2
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);

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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);

2
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) {

16
epmet-module/gov-access/gov-access-server/pom.xml

@ -127,6 +127,10 @@
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -160,6 +164,10 @@
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -193,6 +201,10 @@
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -223,6 +235,10 @@
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

2
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) {

20
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;
}
}

5
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@

18
epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml

@ -6,6 +6,9 @@
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,16 +128,25 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
<!-- 此日志文档只记录ERROR级别的 -->
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>-->
</appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<springProfile name="dev,test,local">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.dao" level="INFO"/>

2
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) {

2
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);

2
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) {

5
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;
/**
* 使用计数
*/

2
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) {

2
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);

6
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;
/**
* 使用计数
*/

5
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;
}

5
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;
}

5
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不可删除隐藏减号
*/

2
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);

8
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<List<SubjectListResultDTO>>().ok(articleService.subjectList(formDTO));
}
}
}

4
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<AddSpecialSubjectResultDTO> 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());

4
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java

@ -40,7 +40,7 @@ public interface TagCustomerDao extends BaseDao<TagCustomerEntity> {
* @param formDTO
* @author zxc
*/
void upsertTagCount(UpdateTagFormDTO formDTO);
void upsertTagCount(UpdateTagFormDTO formDTO);
/**
* @Description 初始化默认标签
@ -55,4 +55,4 @@ public interface TagCustomerDao extends BaseDao<TagCustomerEntity> {
* @return
*/
List<TagCustomerEntity> selectInitData(@Param("customerIdList") List<String> customerIdList);
}
}

8
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;
/**
* 使用计数
*/

28
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);
}
}
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);
}
}

5
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<ArticleDao, ArticleEntit
log.error("updateAuditStatusFailById draftId:{} is not exist in db", draftId);
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
if (syncScanResult.isAllPass()) {
if (syncScanResult != null && syncScanResult.isAllPass()) {
this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED, null);
} else {
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
@ -1113,6 +1113,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
boolean coverFail = false, contentFail = false, titleFail = false;
try {
if (syncScanResult == null){
syncScanResult = new SyncScanResult();
}
List<String> failDataIds = syncScanResult.getFailDataIds();
for (String id : failDataIds) {
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) {

11
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<TagCustomerDao, TagC
formDTO.setCustomerId(customerId);
formDTO.setUpdatedBy(userId);
formDTO.setTagName(tagName);
String randomColor = TagColorUtils.getRandomColor();
formDTO.setTagColor(randomColor);
baseDao.upsertTagCount(formDTO);
TagCustomerEntity tagCustomerEntity = baseDao.selectById(formDTO.getId());
UpdateTagUseCountsResultDTO resultDTO = new UpdateTagUseCountsResultDTO();
resultDTO.setTagId(formDTO.getId());
resultDTO.setTagName(tagName);
resultDTO.setTagId(tagCustomerEntity.getId());
resultDTO.setTagName(tagCustomerEntity.getTagName());
resultDTO.setTagColor(tagCustomerEntity.getTagColor());
return resultDTO;
}
}
}

23
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/TagServiceImpl.java

@ -141,12 +141,16 @@ public class TagServiceImpl implements TagService {
}
Map<String, Set<ZSetOperations.TypedTuple<UpdateTagUseCountsResultDTO>>> 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<String, Set<UpdateTagUseCountsResultDTO>> 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<String, Set<ZSetOperations.TypedTuple<UpdateTagUseCountsResultDTO>>> customerTag, String customerId, String id, String tagName, Integer useCount) {
private void buildZset(Map<String, Set<ZSetOperations.TypedTuple<UpdateTagUseCountsResultDTO>>> customerTag, String customerId, String id, String tagName, String tagColor, Integer useCount) {
Set<ZSetOperations.TypedTuple<UpdateTagUseCountsResultDTO>> 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<UpdateTagUseCountsResultDTO> typedTuple1 = new DefaultTypedTuple<>(initTag, Double.valueOf(useCount));
typedTupleSet.add(typedTuple1);
}
}
}

28
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];
}
}

3
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml

@ -11,7 +11,8 @@
<select id="queryExistedList" parameterType="map" resultType="com.epmet.dto.SpecialSubjectDTO">
SELECT
ss.*,
tc.TAG_NAME AS tagName
tc.TAG_NAME AS tagName,
tc.TAG_COLOR as tagColor
FROM
special_subject ss
INNER JOIN tag_customer tc ON ( ss.CUSTOMER_ID = tc.CUSTOMER_ID AND ss.TAG_ID = tc.id )

10
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/TagCustomerDao.xml

@ -7,11 +7,12 @@
<selectKey keyProperty="id" order="AFTER" resultType="String">
select id from tag_customer where tag_name = #{tagName} AND CUSTOMER_ID = #{customerId}
</selectKey>
INSERT INTO tag_customer ( ID, CUSTOMER_ID, TAG_NAME, USE_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO tag_customer ( ID, CUSTOMER_ID, TAG_NAME, TAG_COLOR, USE_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
(REPLACE ( UUID(), '-', '' ),
#{customerId},
#{tagName},
#{tagColor},
#{useCount},
#{delFlag},
#{revision},
@ -26,11 +27,11 @@
<!-- 初始化默认标签 -->
<insert id="initTags">
INSERT INTO tag_customer ( ID, CUSTOMER_ID, TAG_NAME, USE_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO tag_customer ( ID, CUSTOMER_ID, TAG_NAME, TAG_COLOR, USE_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="tags" item="tag" separator=",">
(
#{tag.id},#{tag.customerId}, #{tag.tagName}, #{tag.useCount}, #{tag.delFlag}, #{tag.revision}, #{tag.createdBy}, NOW(), #{tag.updatedBy}, NOW()
#{tag.id},#{tag.customerId}, #{tag.tagName}, #{tag.tagColor} #{tag.useCount}, #{tag.delFlag}, #{tag.revision}, #{tag.createdBy}, NOW(), #{tag.updatedBy}, NOW()
)
</foreach>
ON DUPLICATE KEY UPDATE
@ -41,6 +42,7 @@
ID,
CUSTOMER_ID,
TAG_NAME,
TAG_COLOR,
USE_COUNT
FROM
tag_customer
@ -54,4 +56,4 @@
ORDER BY CUSTOMER_ID
</select>
</mapper>
</mapper>

2
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);

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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) {

2
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);

2
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) {

2
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) {

Loading…
Cancel
Save