Browse Source

Merge branch 'dev_oss_private' into dev_project_branch

# Conflicts:
#	epmet-gateway/pom.xml
#	epmet-gateway/src/main/resources/bootstrap.yml
#	epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
#	epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java
master
wxz 5 years ago
parent
commit
2aca0a1c3c
  1. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  2. 2
      epmet-gateway/deploy/docker-compose-prod.yml
  3. 16
      epmet-gateway/pom.xml
  4. 11
      epmet-gateway/src/main/resources/bootstrap.yml
  5. 2
      epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml
  6. 2
      epmet-module/data-statistical/data-statistical-server/pom.xml
  7. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  8. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  9. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
  10. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  11. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java
  12. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java
  13. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml
  14. 2
      epmet-module/epmet-common-service/common-service-server/pom.xml
  15. 23
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/HelperController.java
  16. 34
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/HelperVideoDao.java
  17. 49
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/HelperVideoEntity.java
  18. 7
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/HelperVideoService.java
  19. 19
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/HelperVideoServiceImpl.java
  20. 18
      epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.8__createHelperVideo.sql
  21. 33
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml
  22. 2
      epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml
  23. 2
      epmet-module/epmet-message/epmet-message-server/pom.xml
  24. 3
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java
  25. 9
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/constants/PrivacyType.java
  26. 11
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java
  27. 49
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java
  28. 86
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java
  29. 16
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java
  30. 16
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java
  31. 16
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java
  32. 16
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java
  33. 18
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  34. 10
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
  35. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml
  36. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  37. 1
      epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml
  38. 26
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotDetialDTO.java
  39. 1
      epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotResultDTO.java
  40. 2
      epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml
  41. 2
      epmet-module/gov-grid/gov-grid-server/pom.xml
  42. 3
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java
  43. 10
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/RemindService.java
  44. 141
      epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
  45. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml
  46. 2
      epmet-module/gov-issue/gov-issue-server/pom.xml
  47. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  48. 23
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  49. 46
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  50. 2
      epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml
  51. 2
      epmet-module/gov-mine/gov-mine-server/pom.xml
  52. 9
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java
  53. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml
  54. 2
      epmet-module/resi-group/resi-group-server/pom.xml
  55. 10
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java
  56. 31
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  57. 44
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml
  58. 2
      epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml
  59. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  60. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java
  61. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  62. 21
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java
  63. 11
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/dao/ResiWarmheartedApplyDao.java
  64. 19
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java
  65. 20
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml
  66. 18
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml
  67. 16
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml
  68. 11
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/Dockerfile
  69. 18
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-dev.yml
  70. 18
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml
  71. 18
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-test.yml
  72. 227
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml
  73. 15
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/AdvApplication.java
  74. 40
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/aspect/RequestLogAspect.java
  75. 26
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/config/ModuleConfigImpl.java
  76. 28
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java
  77. 33
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java
  78. 56
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/entity/AdvVedioEntity.java
  79. 7
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/AdvVedioService.java
  80. 18
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/impl/AdvVedioServiceImpl.java
  81. 139
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml
  82. 18
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/db/migration/V0.0.1__createAdvVedio.sql
  83. 169
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/logback-spring.xml
  84. 35
      epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/mapper/AdvVedioDao.xml
  85. 21
      epmet-openapi/epmet-openapi-adv/pom.xml
  86. 1
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java
  87. 1
      epmet-openapi/pom.xml

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -250,8 +250,8 @@ public class HttpClientManager {
*/
public Result<String> sendAlarmMsg(String content) {
Long timestamp = System.currentTimeMillis();
String url = "https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c";
String secret = "SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19";
String url = "https://oapi.dingtalk.com/robot/send?access_token=c40055ed85e45fdaafea00f3218928794262ff15163e09ad5c89764433b69806";
String secret = "SEC220eafdcb39ab5dd6cffa9f11b0e5de7178ddac9812d40fdceb6b1dda2963186";
try {
String stringToSign = timestamp + "\n" + secret;

2
epmet-gateway/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-gateway-server:
container_name: epmet-gateway-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-gateway:0.3.42
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-gateway:0.3.43
ports:
- "8080:8080"
network_mode: host # 使用现有网络

16
epmet-gateway/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.42</version>
<version>0.3.43</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>
@ -208,6 +208,10 @@
<!-- 35、多数据源服务 -->
<gateway.routes.data-aggregator-server.url>lb://data-aggregator-server</gateway.routes.data-aggregator-server.url>
<!-- <gateway.routes.data-aggregator-server.url>http://127.0.0.1:8114</gateway.routes.data-aggregator-server.url>-->
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
<!--<gateway.routes.epmet-ext-server.url>lb://127.0.0.1:8115</gateway.routes.epmet-ext-server.url>-->
</properties>
</profile>
<profile>
@ -331,6 +335,10 @@
<!-- 35、多数据源服务 -->
<gateway.routes.data-aggregator-server.url>lb://data-aggregator-server</gateway.routes.data-aggregator-server.url>
<!-- <gateway.routes.data-aggregator-server.url>http://127.0.0.1:8114</gateway.routes.data-aggregator-server.url>-->
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
<!--<gateway.routes.epmet-openapi-adv-server.url>http://localhost:8115</gateway.routes.epmet-openapi-adv-server.url>-->
</properties>
</profile>
<profile>
@ -425,6 +433,9 @@
<gateway.routes.epmet-ext-server.url>lb://epmet-ext-server</gateway.routes.epmet-ext-server.url>
<!-- 35、多数据源服务 -->
<gateway.routes.data-aggregator-server.url>lb://data-aggregator-server</gateway.routes.data-aggregator-server.url>
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
</properties>
</profile>
<profile>
@ -516,6 +527,9 @@
<gateway.routes.epmet-ext-server.url>lb://epmet-ext-server</gateway.routes.epmet-ext-server.url>
<!-- 35、多数据源服务 -->
<gateway.routes.data-aggregator-server.url>lb://data-aggregator-server</gateway.routes.data-aggregator-server.url>
<!--宣传服务-->
<gateway.routes.epmet-openapi-adv-server.url>lb://epmet-openapi-adv-server</gateway.routes.epmet-openapi-adv-server.url>
</properties>
</profile>
</profiles>

11
epmet-gateway/src/main/resources/bootstrap.yml

@ -332,6 +332,15 @@ spring:
filters:
- StripPrefix=1
- CpAuth=true
# 宣传服务
- id: epmet-openapi-adv-server
uri: @gateway.routes.epmet-openapi-adv-server.url@
order: 35
predicates:
- Path=${server.servlet.context-path}/adv/**
filters:
- StripPrefix=1
- CpAuth=true
nacos:
discovery:
server-addr: @nacos.server-addr@
@ -447,12 +456,10 @@ epmet:
- /gov/project/**
- /resi/home/**
- /data/report/**
- /data/aggregator/**
# 内部认证url白名单(在白名单中的,就不会再校验登录了)
internalAuthUrlsWhiteList:
- /epmetuser/customerstaff/customerlist
- /resi/group/topic/callBackPublishTopic
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:

2
epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
data-statistical-server:
container_name: data-statistical-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.79
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.81
ports:
- "8108:8108"
network_mode: host # 使用现有网络

2
epmet-module/data-statistical/data-statistical-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.79</version>
<version>0.3.81</version>
<parent>
<artifactId>data-statistical</artifactId>
<groupId>com.epmet</groupId>

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java

@ -389,19 +389,14 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
/**
* @param param
* @return
* @Description 抽取项目节点历时逻辑
* @Description 抽取项目节点历时逻辑 全量
* @author wangc
* @date 2020.09.17 14:05
**/
@Override
public void extractProjectPeriodData(ExtractOriginFormDTO param) {
int trace = factOriginProjectOrgPeriodDailyDao.selectIfExisted(param.getCustomerId());
Boolean isFirst = trace <= NumConstant.ZERO;
if (StringUtils.isBlank(param.getDateId())) {
param.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE));
}
List<ProjectOrgPeriodResultDTO> extractData =
projectProcessService.getProjectPeriodDirectly(isFirst, param.getCustomerId(), param.getDateId());
projectProcessService.getProjectPeriodDirectly(param.getCustomerId(), param.getDateId());
List<FactOriginProjectOrgPeriodDailyEntity> formattingData = new LinkedList<>();
extractData.forEach(original -> {
FactOriginProjectOrgPeriodDailyEntity dest

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java

@ -94,7 +94,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
private void extractGridUserJoin(ExtractScreenFormDTO formDTO) {
List<DimGridEntity> orgList = dimGridService.getGridListByCustomerId(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(orgList)) {
log.warn("抽取【公众参与-人均议题】,获取组织数据失败");
log.warn("抽取【公众参与-人均议题】,获取组织数据失败,客户Id:{}", formDTO.getCustomerId());
return;
}
//构建组织数据
@ -103,12 +103,12 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取议题月份增量
List<FactIssueGridMonthlyEntity> issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取议题增量为空");
log.error("抽取【公众参与-人均议题】,获取议题增量为空,客户Id:{}", formDTO.getCustomerId());
return;
}
List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(userCountList)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空");
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,客户Id:{}", formDTO.getCustomerId());
return;
}
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
@ -143,7 +143,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID);
if (CollectionUtils.isEmpty(memberCountList)) {
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空");
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,客户Id:{}", formDTO.getCustomerId());
return;
}
gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount()));
@ -184,7 +184,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
private void extractAgencyUserJoin(ExtractScreenFormDTO formDTO) {
List<DimAgencyEntity> orgList = dimAgencyService.getAgencyListByCustomerId(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(orgList)) {
log.warn("抽取【公众参与-人均议题】,获取组织数据失败");
log.warn("抽取【公众参与-人均议题】,获取组织数据失败,客户Id:{}", formDTO.getCustomerId());
return;
}
//构建组织数据
@ -196,7 +196,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
Set<String> agencyIdSet = new HashSet<>();
if (!CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空");
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,客户Id:{}", formDTO.getCustomerId());
issueTotal.forEach(issue -> {
String agencyId = issue.getAgencyId();
agencyIdSet.add(agencyId);
@ -219,7 +219,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID);
if (CollectionUtils.isEmpty(memberCountList)) {
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空");
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,客户Id:{}", formDTO.getCustomerId());
return;
}
orgMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount()));

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java

@ -165,7 +165,9 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
}
//基层治理- 难点赌点 screen_difficulty_data | screen_difficulty_img_data
try {
log.info("【难点赌点数据上报开始------】 当前客户Id{}",param.getCustomerId());
screenGrassrootsGovernDataAbsorptionService.difficultyDataHub(param);
log.info("【难点赌点数据上报结束------】 当前客户Id{}",param.getCustomerId());
}catch (Exception e){
log.error("基层治理-难点赌点抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e);
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -185,5 +185,6 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
imgMap.values().forEach(list -> {imgList.addAll(list);});
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList);
log.info("【大屏数据抽取-难点赌点执行完毕】 客户Id{} 难点赌点数据{}",param.getCustomerId(),JSON.toJSONString(difficulties));
}
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java

@ -97,14 +97,13 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
/**
* @Description 直接从项目业务改造获取项目节点耗时信息
* @param isFirst
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.project.result.ProjectOrgPeriodResultDTO>
* @author wangc
* @date 2020.10.23 09:10
*/
List<ProjectOrgPeriodResultDTO> getProjectPeriodDirectly(Boolean isFirst,String customerId, String date);
List<ProjectOrgPeriodResultDTO> getProjectPeriodDirectly(String customerId, String date);
/**
* 获取办结组织

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java

@ -99,13 +99,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
* @date 2020.10.23 09:10
*/
@Override
public List<ProjectOrgPeriodResultDTO> getProjectPeriodDirectly(Boolean isFirst, String customerId, String date) {
if(isFirst){
return baseDao.selectProjectOrgPeriodDirectly(customerId,null,null);
}else{
return baseDao.selectProjectOrgPeriodDirectly(customerId,null,date);
}
public List<ProjectOrgPeriodResultDTO> getProjectPeriodDirectly( String customerId, String date) {
return baseDao.selectProjectOrgPeriodDirectly(customerId,null,null);
}
@Override

2
epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
common-service-server:
container_name: common-service-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/common-service-server:0.3.25
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/common-service-server:0.3.26
ports:
- "8103:8103"
network_mode: host # 使用现有网络

2
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.25</version>
<version>0.3.26</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-service</artifactId>

23
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/HelperController.java

@ -0,0 +1,23 @@
package com.epmet.controller;
import com.epmet.entity.HelperVideoEntity;
import com.epmet.service.HelperVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("helper")
public class HelperController {
@Autowired
private HelperVideoService helperVideoService;
@GetMapping("helper-video")
public String getHelpVideo() {
HelperVideoEntity enableHelperVideo = helperVideoService.getEnableHelperVideo();
return "redirect:" + enableHelperVideo.getPath();
}
}

34
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/HelperVideoDao.java

@ -0,0 +1,34 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.HelperVideoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 宣传视频
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-01
*/
@Mapper
public interface HelperVideoDao extends BaseDao<HelperVideoEntity> {
HelperVideoEntity getEnableHelperVideo();
}

49
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/HelperVideoEntity.java

@ -0,0 +1,49 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 宣传视频
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-01
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("helper_video")
public class HelperVideoEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 存储路径
*/
private String path;
/**
* 是否启用
*/
private Integer enable;
}

7
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/HelperVideoService.java

@ -0,0 +1,7 @@
package com.epmet.service;
import com.epmet.entity.HelperVideoEntity;
public interface HelperVideoService {
HelperVideoEntity getEnableHelperVideo();
}

19
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/HelperVideoServiceImpl.java

@ -0,0 +1,19 @@
package com.epmet.service.impl;
import com.epmet.dao.HelperVideoDao;
import com.epmet.entity.HelperVideoEntity;
import com.epmet.service.HelperVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class HelperVideoServiceImpl implements HelperVideoService {
@Autowired
private HelperVideoDao helperVideoDao;
@Override
public HelperVideoEntity getEnableHelperVideo() {
return helperVideoDao.getEnableHelperVideo();
}
}

18
epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.8__createHelperVideo.sql

@ -0,0 +1,18 @@
-- create database epmet_adv default character set utf8mb4;
-- CREATE USER epmet_adv_user@'%' IDENTIFIED BY 'EpmEt-db-UsEr';
-- GRANT ALL ON `epmet_adv%`.* TO 'epmet_adv_user'@'%';
-- flush privileges;
CREATE TABLE `helper_video` (
`ID` varchar(64) NOT NULL COMMENT 'id',
`PATH` varchar(255) NOT NULL COMMENT '存储路径',
`ENABLE` tinyint(1) NOT NULL COMMENT '是否启用',
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁',
`DEL_FLAG` int(11) unsigned DEFAULT NULL COMMENT '删除标识 0:未删除 1:删除',
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建者',
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新者',
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宣传视频'

33
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.HelperVideoDao">
<resultMap type="com.epmet.entity.HelperVideoEntity" id="baseMap">
<result property="id" column="ID"/>
<result property="path" column="PATH"/>
<result property="enable" column="ENABLE"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getEnableHelperVideo" resultMap="baseMap">
select id,
path,
enable,
revision,
del_flag,
created_by,
created_time,
updated_by,
updated_time
from helper_video
where ENABLE = 1
limit 1
</select>
</mapper>

2
epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-message-server:
container_name: epmet-message-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-message-server:0.3.32
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-message-server:0.3.33
ports:
- "8085:8085"
network_mode: host # 使用现有网络

2
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.32</version>
<version>0.3.33</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-message</artifactId>

3
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java

@ -50,8 +50,9 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService {
if (ExtConstant.APP_RESI.equals(dto.getApp())){
wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_RESI);
}
//2020.12.23 sun 数据库字段key值有work改成gov 外挂接口直接传的gov不用再转换
if (ExtConstant.APP_GOV.equals(dto.getApp())){
wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_WORK);
wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_GOV);
}
wxSubscribeMessageFormDTO.setBehaviorType(dto.getTitle());
wxSubscribeMessageFormDTO.setMessageTime(new Date());

9
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/constants/PrivacyType.java

@ -0,0 +1,9 @@
package com.epmet.constants;
/**
* 隐私类型
*/
public interface PrivacyType {
String INTERNAL = "internal";
String EXTERNAL = "external";
}

11
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java

@ -50,15 +50,16 @@ public abstract class AbstractCloudStorageService {
* @param path 文件路径包含文件名
* @return 返回http地址
*/
public abstract String upload(byte[] data, String path);
public abstract String upload(byte[] data, String path, String privacyType);
/**
* 文件上传
* @param data 文件字节数组
* @param suffix 后缀
* @param privacyType 隐私类型默认external外部
* @return 返回http地址
*/
public abstract String uploadSuffix(byte[] data, String suffix);
public abstract String uploadSuffix(byte[] data, String suffix, String privacyType);
/**
* 文件上传
@ -66,7 +67,7 @@ public abstract class AbstractCloudStorageService {
* @param path 文件路径包含文件名
* @return 返回http地址
*/
public abstract String upload(InputStream inputStream, String path);
public abstract String upload(InputStream inputStream, String path, String privacyType);
/**
* 文件上传
@ -74,12 +75,12 @@ public abstract class AbstractCloudStorageService {
* @param suffix 后缀
* @return 返回http地址
*/
public abstract String uploadSuffix(InputStream inputStream, String suffix);
public abstract String uploadSuffix(InputStream inputStream, String suffix, String privacyType);
/**
* 文件下载
* sun
*/
public abstract void down() throws IOException;
public abstract void down(String privacyType) throws IOException;
}

49
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java

@ -12,6 +12,7 @@ import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.DownloadFileRequest;
import com.aliyun.oss.model.DownloadFileResult;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.constants.PrivacyType;
import com.epmet.exception.ModuleErrorCode;
import java.io.ByteArrayInputStream;
@ -29,39 +30,57 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService {
this.config = config;
}
/**
* @Description 根据隐私类型获取属性传递internal的时候会返回内部的否则返回外部的即公开的
* @return
* @author wxz
* @date 2021.01.04 13:49
*/
private CloudStorageConfig.AliyunCloudStorageConfigProps getPropsByprivacyType(String privacyType) {
if (PrivacyType.INTERNAL.equalsIgnoreCase(privacyType)) {
return config.getAliyun().getInternal();
} else {
return config.getAliyun().getExternal();
}
}
@Override
public String upload(byte[] data, String path) {
return upload(new ByteArrayInputStream(data), path);
public String upload(byte[] data, String path, String privacyType) {
return upload(new ByteArrayInputStream(data), path, privacyType);
}
@Override
public String upload(InputStream inputStream, String path) {
OSSClient client = new OSSClient(config.getAliyunEndPoint(), config.getAliyunAccessKeyId(),
config.getAliyunAccessKeySecret());
public String upload(InputStream inputStream, String path, String privacyType) {
CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType);
OSSClient client = new OSSClient(props.getAliyunEndPoint(), props.getAliyunAccessKeyId(),
props.getAliyunAccessKeySecret());
try {
client.putObject(config.getAliyunBucketName(), path, inputStream);
client.putObject(props.getAliyunBucketName(), path, inputStream);
client.shutdown();
} catch (Exception e){
throw new RenException(ModuleErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
}
return config.getAliyunDomain() + "/" + path;
return props.getAliyunDomain() + "/" + path;
}
@Override
public String uploadSuffix(byte[] data, String suffix) {
return upload(data, getPath(config.getAliyunPrefix(), suffix));
public String uploadSuffix(byte[] data, String suffix, String privacyType) {
CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType);
return upload(data, getPath(props.getAliyunPrefix(), suffix), privacyType);
}
@Override
public String uploadSuffix(InputStream inputStream, String suffix) {
return upload(inputStream, getPath(config.getAliyunPrefix(), suffix));
public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) {
CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType);
return upload(inputStream, getPath(props.getAliyunPrefix(), suffix), privacyType);
}
@Override
public void down() throws IOException {
OSSClient client = new OSSClient(config.getAliyunEndPoint(), config.getAliyunAccessKeyId(),
config.getAliyunAccessKeySecret());
public void down(String privacyType) throws IOException {
CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType);
OSSClient client = new OSSClient(props.getAliyunEndPoint(), props.getAliyunAccessKeyId(),
props.getAliyunAccessKeySecret());
try {
/*
@ -88,7 +107,7 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService {
}*/
//方式三
DownloadFileRequest downloadFileRequest = new DownloadFileRequest(config.getAliyunBucketName(), "epmet/test/20201103/198f3c11490a44eb964c5c8e9989a507.jpg");
DownloadFileRequest downloadFileRequest = new DownloadFileRequest(props.getAliyunBucketName(), "epmet/test/20201103/198f3c11490a44eb964c5c8e9989a507.jpg");
downloadFileRequest.setDownloadFile("C:/Users/Administrator/Desktop/dd/4.jpg");// 本地下载文件名称
downloadFileRequest.setPartSize(1 * 1024 * 1024);// 分片大小,取值范围为1B~5GB。
downloadFileRequest.setTaskNum(10);//10个任务并发下载,默认值为1

86
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java

@ -56,29 +56,29 @@ public class CloudStorageConfig implements Serializable {
@NotBlank(message="{qiniu.bucketname.require}", groups = QiniuGroup.class)
private String qiniuBucketName;
@ApiModelProperty(value = "阿里云绑定的域名")
@NotBlank(message="{aliyun.domain.require}", groups = AliyunGroup.class)
@URL(message = "{aliyun.domain.url}", groups = AliyunGroup.class)
private String aliyunDomain;
@ApiModelProperty(value = "阿里云路径前缀")
private String aliyunPrefix;
@ApiModelProperty(value = "阿里云EndPoint")
@NotBlank(message="{aliyun.endPoint.require}", groups = AliyunGroup.class)
private String aliyunEndPoint;
@ApiModelProperty(value = "阿里云AccessKeyId")
@NotBlank(message="{aliyun.accesskeyid.require}", groups = AliyunGroup.class)
private String aliyunAccessKeyId;
@ApiModelProperty(value = "阿里云AccessKeySecret")
@NotBlank(message="{aliyun.accesskeysecret.require}", groups = AliyunGroup.class)
private String aliyunAccessKeySecret;
@ApiModelProperty(value = "阿里云BucketName")
@NotBlank(message="{aliyun.bucketname.require}", groups = AliyunGroup.class)
private String aliyunBucketName;
//@ApiModelProperty(value = "阿里云绑定的域名")
//@NotBlank(message="{aliyun.domain.require}", groups = AliyunGroup.class)
//@URL(message = "{aliyun.domain.url}", groups = AliyunGroup.class)
//private String aliyunDomain;
//
//@ApiModelProperty(value = "阿里云路径前缀")
//private String aliyunPrefix;
//
//@ApiModelProperty(value = "阿里云EndPoint")
//@NotBlank(message="{aliyun.endPoint.require}", groups = AliyunGroup.class)
//private String aliyunEndPoint;
//
//@ApiModelProperty(value = "阿里云AccessKeyId")
//@NotBlank(message="{aliyun.accesskeyid.require}", groups = AliyunGroup.class)
//private String aliyunAccessKeyId;
//
//@ApiModelProperty(value = "阿里云AccessKeySecret")
//@NotBlank(message="{aliyun.accesskeysecret.require}", groups = AliyunGroup.class)
//private String aliyunAccessKeySecret;
//
//@ApiModelProperty(value = "阿里云BucketName")
//@NotBlank(message="{aliyun.bucketname.require}", groups = AliyunGroup.class)
//private String aliyunBucketName;
@ApiModelProperty(value = "腾讯云绑定的域名")
@NotBlank(message="{qcloud.domain.require}", groups = QcloudGroup.class)
@ -125,4 +125,44 @@ public class CloudStorageConfig implements Serializable {
@NotBlank(message="{local.path.url}", groups = LocalGroup.class)
private String localPath;
private AliyunCloudStorageConfig aliyun;
/**
* 阿里云存储配置
*/
@Data
public static class AliyunCloudStorageConfig {
private AliyunCloudStorageConfigProps internal;
private AliyunCloudStorageConfigProps external;
}
/**
* 阿里云存储配置属性
*/
@Data
public static class AliyunCloudStorageConfigProps {
@ApiModelProperty(value = "阿里云绑定的域名")
@NotBlank(message="{aliyun.domain.require}", groups = AliyunGroup.class)
@URL(message = "{aliyun.domain.url}", groups = AliyunGroup.class)
private String aliyunDomain;
@ApiModelProperty(value = "阿里云路径前缀")
private String aliyunPrefix;
@ApiModelProperty(value = "阿里云EndPoint")
@NotBlank(message="{aliyun.endPoint.require}", groups = AliyunGroup.class)
private String aliyunEndPoint;
@ApiModelProperty(value = "阿里云AccessKeyId")
@NotBlank(message="{aliyun.accesskeyid.require}", groups = AliyunGroup.class)
private String aliyunAccessKeyId;
@ApiModelProperty(value = "阿里云AccessKeySecret")
@NotBlank(message="{aliyun.accesskeysecret.require}", groups = AliyunGroup.class)
private String aliyunAccessKeySecret;
@ApiModelProperty(value = "阿里云BucketName")
@NotBlank(message="{aliyun.bucketname.require}", groups = AliyunGroup.class)
private String aliyunBucketName;
}
}

16
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java

@ -35,12 +35,12 @@ public class FastDFSCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String upload(byte[] data, String path) {
return upload(new ByteArrayInputStream(data), path);
public String upload(byte[] data, String path, String privacyType) {
return upload(new ByteArrayInputStream(data), path, privacyType);
}
@Override
public String upload(InputStream inputStream, String suffix) {
public String upload(InputStream inputStream, String suffix, String privacyType) {
StorePath storePath;
try {
storePath = defaultGenerateStorageClient.uploadFile("group1", inputStream, inputStream.available(), suffix);
@ -52,17 +52,17 @@ public class FastDFSCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String uploadSuffix(byte[] data, String suffix) {
return upload(data, suffix);
public String uploadSuffix(byte[] data, String suffix, String privacyType) {
return upload(data, suffix, privacyType);
}
@Override
public String uploadSuffix(InputStream inputStream, String suffix) {
return upload(inputStream, suffix);
public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) {
return upload(inputStream, suffix, privacyType);
}
@Override
public void down() throws IOException {
public void down(String privacyType) throws IOException {
}
}

16
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java

@ -29,12 +29,12 @@ public class LocalCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String upload(byte[] data, String path) {
return upload(new ByteArrayInputStream(data), path);
public String upload(byte[] data, String path, String privacyType) {
return upload(new ByteArrayInputStream(data), path, privacyType);
}
@Override
public String upload(InputStream inputStream, String path) {
public String upload(InputStream inputStream, String path, String privacyType) {
File file = new File(config.getLocalPath() + File.separator + path);
try {
FileUtils.copyToFile(inputStream, file);
@ -45,17 +45,17 @@ public class LocalCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String uploadSuffix(byte[] data, String suffix) {
return upload(data, getPath(config.getLocalPrefix(), suffix));
public String uploadSuffix(byte[] data, String suffix, String privacyType) {
return upload(data, getPath(config.getLocalPrefix(), suffix), privacyType);
}
@Override
public String uploadSuffix(InputStream inputStream, String suffix) {
return upload(inputStream, getPath(config.getLocalPrefix(), suffix));
public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) {
return upload(inputStream, getPath(config.getLocalPrefix(), suffix), privacyType);
}
@Override
public void down() throws IOException {
public void down(String privacyType) throws IOException {
}
}

16
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java

@ -48,12 +48,12 @@ public class QcloudCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String upload(byte[] data, String path) {
return upload(new ByteArrayInputStream(data), path);
public String upload(byte[] data, String path, String privacyType) {
return upload(new ByteArrayInputStream(data), path, privacyType);
}
@Override
public String upload(InputStream inputStream, String path) {
public String upload(InputStream inputStream, String path, String privacyType) {
try {
COSClient client = new COSClient(credentials, clientConfig);
@ -75,17 +75,17 @@ public class QcloudCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String uploadSuffix(byte[] data, String suffix) {
return upload(data, getPath(config.getQcloudPrefix(), suffix));
public String uploadSuffix(byte[] data, String suffix, String privacyType) {
return upload(data, getPath(config.getQcloudPrefix(), suffix), privacyType);
}
@Override
public String uploadSuffix(InputStream inputStream, String suffix) {
return upload(inputStream, getPath(config.getQcloudPrefix(), suffix));
public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) {
return upload(inputStream, getPath(config.getQcloudPrefix(), suffix), privacyType);
}
@Override
public void down() throws IOException {
public void down(String privacyType) throws IOException {
}
}

16
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java

@ -45,7 +45,7 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String upload(byte[] data, String path) {
public String upload(byte[] data, String path, String privacyType) {
try {
Response res = uploadManager.put(data, path, token);
if (!res.isOK()) {
@ -59,27 +59,27 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService {
}
@Override
public String upload(InputStream inputStream, String path) {
public String upload(InputStream inputStream, String path, String privacyType) {
try {
byte[] data = IOUtils.toByteArray(inputStream);
return this.upload(data, path);
return this.upload(data, path, privacyType);
} catch (IOException e) {
throw new RenException(ModuleErrorCode.OSS_UPLOAD_FILE_ERROR, e, "");
}
}
@Override
public String uploadSuffix(byte[] data, String suffix) {
return upload(data, getPath(config.getQiniuPrefix(), suffix));
public String uploadSuffix(byte[] data, String suffix, String privacyType) {
return upload(data, getPath(config.getQiniuPrefix(), suffix), privacyType);
}
@Override
public String uploadSuffix(InputStream inputStream, String suffix) {
return upload(inputStream, getPath(config.getQiniuPrefix(), suffix));
public String uploadSuffix(InputStream inputStream, String suffix, String privacyType) {
return upload(inputStream, getPath(config.getQiniuPrefix(), suffix), privacyType);
}
@Override
public void down() throws IOException {
public void down(String privacyType) throws IOException {
}
}

18
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -114,7 +114,7 @@ public class OssController {
//上传文件
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
String url = OssFactory.build().uploadSuffix(file.getBytes(), extension);
String url = OssFactory.build().uploadSuffix(file.getBytes(), extension, null);
//保存文件信息
OssEntity ossEntity = new OssEntity();
@ -147,17 +147,17 @@ public class OssController {
**/
@PostMapping("uploadimg")
public Result<UploadImgResultDTO> uploadImg(@RequestParam("file") MultipartFile file) {
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
@PostMapping("uploadwximg")
public Result<UploadImgResultDTO> uploadWxImg(@RequestPart("media") MultipartFile media) {
return ossService.uploadImg(media);
return ossService.uploadImg(media, null);
}
@PostMapping("uploadqrcode")
public Result<UploadImgResultDTO> uploadQrCode(@RequestPart(value = "file") MultipartFile file) {
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
/**
@ -183,7 +183,7 @@ public class OssController {
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
@PostMapping("function/upload")
@ -203,7 +203,7 @@ public class OssController {
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
@PostMapping("article/upload")
@ -225,7 +225,7 @@ public class OssController {
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
@ -255,7 +255,7 @@ public class OssController {
, EpmetErrorCode.OPER_UPLOAD_IMG_SIZE_ERROR.getMsg());
}
return ossService.uploadImg(file);
return ossService.uploadImg(file, null);
}
/**
@ -269,7 +269,7 @@ public class OssController {
//byte[] byteFile = file.getBytes();
InputStream inputStream = new ByteArrayInputStream(byteFile);
MultipartFile filse = new MockMultipartFile(ContentType.APPLICATION_OCTET_STREAM.toString(), inputStream);
return ossService.extUpload(filse,fileName);
return ossService.extUpload(filse,fileName, null);
}
/**

10
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java

@ -48,7 +48,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
}
@Override
public Result<UploadImgResultDTO> uploadImg(MultipartFile file) {
public Result<UploadImgResultDTO> uploadImg(MultipartFile file, String privacy) {
if (file.isEmpty()) {
return new Result<UploadImgResultDTO>().error(ModuleErrorCode.UPLOAD_FILE_EMPTY);
}
@ -56,7 +56,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
String url = null;
try {
url = OssFactory.build().uploadSuffix(file.getBytes(), extension);
url = OssFactory.build().uploadSuffix(file.getBytes(), extension, privacy);
} catch (IOException e) {
e.printStackTrace();
logger.error("图片上传异常");
@ -74,9 +74,9 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
}
@Override
public Result<UploadImgResultDTO> extUpload(MultipartFile file, String fileName) {
public Result<UploadImgResultDTO> extUpload(MultipartFile file, String fileName, String privacy) {
try {
OssFactory.build().down();
OssFactory.build().down(privacy);
} catch (IOException e) {
e.printStackTrace();
}
@ -88,7 +88,7 @@ public class OssServiceImpl extends BaseServiceImpl<OssDao, OssEntity> implement
String extension = FilenameUtils.getExtension(fileName);
String url = null;
try {
url = OssFactory.build().uploadSuffix(file.getBytes(), extension);
url = OssFactory.build().uploadSuffix(file.getBytes(), extension, privacy);
} catch (IOException e) {
e.printStackTrace();
logger.error("图片上传异常");

2
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.156
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.157
ports:
- "8110:8110"
network_mode: host # 使用现有网络

2
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.156</version>
<version>0.0.157</version>
<parent>
<groupId>com.epmet</groupId>

1
epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml

@ -122,6 +122,7 @@ third:
- https://epmet-cloud.elinkservice.cn
- https://epmet-dev.elinkservice.cn
- https://epmet-test.elinkservice.cn
- https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com
webviewDomain:
- https://epmet-ext.elinkservice.cn
- https://epmet-ext1.elinkservice.cn

26
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotDetialDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/12/25 13:46
*/
@Data
public class RedDotDetialDTO implements Serializable {
private static final long serialVersionUID = 115845734341321201L;
private String key;
private Long count;
public RedDotDetialDTO() {
}
public RedDotDetialDTO(String key, Long count) {
this.key = key;
this.count = count;
}
}

1
epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotResultDTO.java

@ -24,5 +24,6 @@ public class RedDotResultDTO implements Serializable {
* 需要显示的功能key群组管理work_grassroots_group居民管理work_grassroots_resi党员认证work_grassroots_partyauth议题管理work_grassroots_issue
*/
private List<String> functionList;
private List<RedDotDetialDTO> details;
}

2
epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-grid-server:
container_name: gov-grid-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-grid-server:0.3.39
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-grid-server:0.3.40
ports:
- "8097:8097"
network_mode: host # 使用现有网络

2
epmet-module/gov-grid/gov-grid-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.39</version>
<version>0.3.40</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-grid</artifactId>

3
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java

@ -32,7 +32,8 @@ public class RemindController {
public Result<RedDotResultDTO> queryGridRedDot(@LoginUser TokenDto tokenDto, @RequestBody RedDotFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO);
RedDotResultDTO redDotResultDTO=remindService.queryGridRedDot(formDTO);
// RedDotResultDTO redDotResultDTO=remindService.queryGridRedDot(formDTO);
RedDotResultDTO redDotResultDTO=remindService.queryGridRedDotV2(formDTO);
return new Result<RedDotResultDTO>().ok(redDotResultDTO);
}

10
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/RemindService.java

@ -18,7 +18,17 @@ public interface RemindService {
* @Description 根据网格id查询基层治理下网格各功能菜单是否显示红点以及除当前网格外其他网格是否有待办事项
* @Date 2020/5/13 14:34
**/
@Deprecated
RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO);
TestResultDTO1 test(TestFormDTO1 testFormDTO1);
/**
* @return com.epmet.dto.result.RedDotResultDTO
* @param formDTO
* @author yinzuomei
* @description 根据网格id查询基层治理下网格各功能菜单是否显示红点以及除当前网格外其他网格是否有待办事项
* @Date 2020/12/25 10:49
**/
RedDotResultDTO queryGridRedDotV2(RedDotFormDTO formDTO);
}

141
epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java

@ -6,19 +6,19 @@ import com.epmet.constant.WorkGrassRootsFunctionConstant;
import com.epmet.controller.TestFormDTO1;
import com.epmet.controller.TestResultDTO1;
import com.epmet.dto.form.RedDotFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.GridAuditingBadgeCountResultDTO;
import com.epmet.dto.result.GridProcessingCountResultDTO;
import com.epmet.dto.result.RedDotResultDTO;
import com.epmet.dto.result.*;
import com.epmet.feign.*;
import com.epmet.service.RemindService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description 基层治理待办事项提醒
@ -48,10 +48,16 @@ public class RemindServiceImpl implements RemindService {
public RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO) {
RedDotResultDTO redDotResultDTO = new RedDotResultDTO();
redDotResultDTO.setOtherGridRedDot(false);
//当前基层治理以下图标需要显示红点提醒
//1、群组管理(待审核的小组申请、变更小组申请)
//2、居民管理(待审核的热心居民申请)
//3、党员认证(待审核的认证党员申请)
//4、议题管理(待审核的议题、表决中的议题)
//5、徽章审核(待审核的徽章)
redDotResultDTO.setFunctionList(getRedDotFunctionList(formDTO.getGridId()));
Result<List<CustomerGridByUserIdResultDTO>> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId());
if (!govOrgResult.success()) {
logger.error(String.format("调用gov-org-server服务查询工作人员网格列表失败返回结果", govOrgResult.toString()));
logger.warn(String.format("调用gov-org-server服务查询工作人员网格列表失败返回结果", govOrgResult.toString()));
}else{
List<CustomerGridByUserIdResultDTO> gridList = govOrgResult.getData();
logger.info("我的网格列表"+gridList.size());
@ -76,18 +82,23 @@ public class RemindServiceImpl implements RemindService {
List<String> functionList = new ArrayList<>();
List<String> gridIdList = new ArrayList<>();
gridIdList.add(gridId);
//1、群组管理(待审核的小组申请、变更小组申请)
if (this.getWorkGrassRootsGroup(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP);
}
//2、居民管理(待审核的热心居民申请)
if (this.getWorkGrassRootsResi(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI);
}
//3、党员认证(待审核的认证党员申请)
if (this.getWorkGrassRootsPartyAuth(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH);
}
//4、议题管理(待审核的议题、表决中的议题)
if (this.getWorkGrassRootsIssue(gridIdList)) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE);
}
//5、徽章审核(待审核的徽章)
if(this.getWorkGrassRootsBadge(gridIdList)){
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE);
}
@ -108,7 +119,7 @@ public class RemindServiceImpl implements RemindService {
}
}
}else{
logger.error(String.format("查询群组管理待办事项数失败,%s",groupProcessingCountResult.getMsg()));
logger.warn(String.format("查询群组管理待办事项数失败,%s",groupProcessingCountResult.getMsg()));
}
return false;
}
@ -126,7 +137,7 @@ public class RemindServiceImpl implements RemindService {
}
}
} else {
logger.error(String.format("查询网格内待审核热心居民数失败,%s",resiGroupProcessingCountResult.getMsg()));
logger.warn(String.format("查询网格内待审核热心居民数失败,%s",resiGroupProcessingCountResult.getMsg()));
}
return false;
}
@ -144,7 +155,7 @@ public class RemindServiceImpl implements RemindService {
}
}
}else{
logger.error(String.format("查询网格内待审核党员总数失败,%s",partyMemberProcessingCountResult.getMsg()));
logger.warn(String.format("查询网格内待审核党员总数失败,%s",partyMemberProcessingCountResult.getMsg()));
}
return false;
}
@ -162,7 +173,7 @@ public class RemindServiceImpl implements RemindService {
}
}
}else{
logger.error("查询网格表决中议题总数失败,%s",issueResult.getMsg());
logger.warn("查询网格表决中议题总数失败,%s",issueResult.getMsg());
}
return false;
}
@ -179,7 +190,7 @@ public class RemindServiceImpl implements RemindService {
}
}
}else{
logger.error(String.format("查询网格待审核徽章申请失败,%s",badgeResult.getMsg()));
logger.warn(String.format("查询网格待审核徽章申请失败,%s",badgeResult.getMsg()));
}
return false;
}
@ -192,5 +203,115 @@ public class RemindServiceImpl implements RemindService {
}
return new TestResultDTO1();
}
/**
* @param formDTO
* @return com.epmet.dto.result.RedDotResultDTO
* @author yinzuomei
* @description 根据网格id查询基层治理下网格各功能菜单是否显示红点以及除当前网格外其他网格是否有待办事项
* @Date 2020/12/25 10:49
**/
@Override
public RedDotResultDTO queryGridRedDotV2(RedDotFormDTO formDTO) {
RedDotResultDTO redDotResultDTO = new RedDotResultDTO();
redDotResultDTO.setOtherGridRedDot(false);
redDotResultDTO.setFunctionList(Collections.EMPTY_LIST);
Result<List<CustomerGridByUserIdResultDTO>> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId());
if (govOrgResult.success() && !CollectionUtils.isEmpty(govOrgResult.getData())) {
List<String> functionList = new ArrayList<>();
List<RedDotDetialDTO> details = new ArrayList<>();
List<String> gridIdList = govOrgResult.getData().stream().map(CustomerGridByUserIdResultDTO::getGridId).collect(Collectors.toList());
//1、群组管理(待审核的小组申请、变更小组申请)
Result<List<GridProcessingCountResultDTO>> groupResult = resiGroupFeignClient.queryGroupProcessingCount(gridIdList);
if (groupResult.success() && !CollectionUtils.isEmpty(groupResult.getData())) {
groupResult.getData().forEach(groupDto -> {
//当前网格
if (formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_GROUP, groupDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(groupDto.getGridId()) && groupDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
});
}
//2、居民管理(待审核的热心居民申请)
Result<List<GridProcessingCountResultDTO>> resiResult = resiPartymemberFeignClient.queryResiProcessingCount(gridIdList);
if (resiResult.success() && !CollectionUtils.isEmpty(resiResult.getData())) {
resiResult.getData().forEach(resiDto -> {
//当前网格
if (formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_RESI, resiDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(resiDto.getGridId()) && resiDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
});
}
//3、党员认证(待审核的认证党员申请)
Result<List<GridProcessingCountResultDTO>> partyResult = resiPartymemberFeignClient.queryPartyMemberProcessingCount(gridIdList);
if (partyResult.success() && !CollectionUtils.isEmpty(partyResult.getData())) {
partyResult.getData().forEach(partyDto -> {
//当前网格
if (formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_PARTYAUTH, partyDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(partyDto.getGridId()) && partyDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
});
}
//4、议题管理(待审核的议题、表决中的议题)
Result<List<GridProcessingCountResultDTO>> issueResult = govIssueFeignClient.queryVotingIssueCount(gridIdList);
if (issueResult.success() && !CollectionUtils.isEmpty(issueResult.getData())) {
issueResult.getData().forEach(issueDto -> {
//当前网格
if (formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE, issueDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(issueDto.getGridId()) && issueDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
});
}
//5、徽章审核(待审核的徽章)
Result<List<GridAuditingBadgeCountResultDTO>> badgeResult = epmetUserOpenFeignClient.queryGridAuditingBadgeCount(gridIdList);
if (badgeResult.success() && !CollectionUtils.isEmpty(badgeResult.getData())) {
badgeResult.getData().forEach(badgeDto -> {
//当前网格
if (formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE);
details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE, badgeDto.getCount()));
}
//其他网格
if (!formDTO.getGridId().equals(badgeDto.getGridId()) && badgeDto.getCount() > 0) {
redDotResultDTO.setOtherGridRedDot(true);
}
});
}
redDotResultDTO.setFunctionList(functionList);
redDotResultDTO.setDetails(details);
} else {
logger.warn(String.format("基层治理红点查询,获取工作人员所属网格失败,当前staffId=%s", formDTO.getStaffId()));
}
return redDotResultDTO;
}
}

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-issue-server:
container_name: gov-issue-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.58
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.60
ports:
- "8101:8101"
network_mode: host # 使用现有网络

2
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.58</version>
<version>0.3.60</version>
<parent>
<artifactId>gov-issue</artifactId>
<groupId>com.epmet</groupId>

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -207,4 +207,13 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @return java.util.List<com.epmet.entity.IssueEntity>
*/
List<GroupClosedListResultDTO> selectClosedListByTopic(AllIssueFormDTO formDTO);
/**
* @return java.util.List<com.epmet.dto.result.GridVotingIssueCountResultDTO>
* @param gridIdList
* @author yinzuomei
* @description 返回各个网格内待审核+表决中议题总数
* @Date 2020/12/25 14:12
**/
List<GridVotingIssueCountResultDTO> selectIssueRedDot(@Param("gridIdList") List<String> gridIdList);
}

23
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -196,19 +196,10 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
public List<GridVotingIssueCountResultDTO> queryVotingIssueCount(List<String> gridIdList) {
List<GridVotingIssueCountResultDTO> list = new ArrayList<>();
for (String gridId : gridIdList) {
GridVotingIssueCountResultDTO gridVotingIssueCountResultDTO = new GridVotingIssueCountResultDTO();
gridVotingIssueCountResultDTO.setGridId(gridId);
Integer auditingCount = govIssueRedis.queryVotingIssueCount(gridId);
if (null == auditingCount) {
gridVotingIssueCountResultDTO.setCount(0);
} else {
gridVotingIssueCountResultDTO.setCount(auditingCount);
}
list.add(gridVotingIssueCountResultDTO);
}
return list;
if(CollectionUtils.isEmpty(gridIdList)){
return Collections.EMPTY_LIST;
}
return baseDao.selectIssueRedDot(gridIdList);
}
@Override
@ -293,8 +284,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
voteInitCache.setIssueId(issueDTO.getId());
voteInitCache.setShouldVoteCount(issueShiftedFromTopicFormDTO.getVotableCount());
issueVoteDetailRedis.set(voteInitCache);
//4.该网格下表决中议题总数量+1
govIssueRedis.addWorkGrassrootsIssueRedDotValue(issueShiftedFromTopicFormDTO.getGridId());
if(StringUtils.isNotBlank(issueShiftedFromTopicFormDTO.getIssueId())) issueDTO.setId(issueShiftedFromTopicFormDTO.getIssueId());
return issueDTO.getId();
@ -692,8 +681,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
logger.error("议题关闭,推送微信订阅消息失败!");
}
//5:缓存中网格下表决中的议题总数减1
govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId());
try {
issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null);
}catch (RenException e){
@ -870,8 +857,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
logger.error("议题转项目,推送微信订阅消息失败!");
}
//6:缓存中网格下表决中的议题总数减1
govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId());
try{
issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null);
}catch(RenException e){

46
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -242,7 +242,7 @@
ID AS issueId,
IFNULL(ISSUE_TITLE,'') AS issueTitle,
IFNULL(CLOSE_REASON,'') AS closeReason,
UNIX_TIMESTAMP( created_time ) AS closedTime
UNIX_TIMESTAMP( closed_time ) AS closedTime
FROM
issue
WHERE
@ -513,4 +513,48 @@
</foreach>
ORDER BY CREATED_TIME DESC
</select>
<select id="selectIssueRedDot" parameterType="map" resultType="com.epmet.dto.result.GridVotingIssueCountResultDTO">
SELECT
temp.gridId,
sum( total ) AS count
FROM
(
SELECT
i.GRID_ID AS gridId,
count(*) AS total
FROM
issue i
WHERE
i.DEL_FLAG = '0'
AND i.ISSUE_STATUS = 'voting'
<if test="gridIdList!=null and gridIdList.size()!=0">
AND i.GRID_ID in
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
GROUP BY
i.GRID_ID
UNION ALL
SELECT
ia.GRID_ID AS gridId,
count(*) AS total
FROM
issue_application ia
WHERE
ia.DEL_FLAG = '0'
AND ia.APPLY_STATUS = 'under_auditing'
<if test="gridIdList!=null and gridIdList.size()!=0">
AND ia.GRID_ID in
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
GROUP BY
ia.GRID_ID
) temp
GROUP BY
temp.gridId
</select>
</mapper>

2
epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
gov-mine-server:
container_name: gov-mine-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.35
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.36
ports:
- "8098:8098"
network_mode: host # 使用现有网络

2
epmet-module/gov-mine/gov-mine-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.35</version>
<version>0.3.36</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>gov-mine</artifactId>

9
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java

@ -20,7 +20,6 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.StaffAgencyConstant;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.form.StaffGridVisitedFormDTO;
import com.epmet.dto.form.SwitchGridFormDTO;
@ -91,19 +90,19 @@ public class StaffAgencyServiceImpl implements StaffAgencyService {
for (StaffGridResultDTO staffGridInfo : gridList) {
if (this.checkGroupProcessing(staffGridInfo.getGridId(), groupProcessingList)) {
staffGridInfo.setRedDot(true);
break;
continue;
}
if (this.checkResiProcessing(staffGridInfo.getGridId(), resiProcessingList)) {
staffGridInfo.setRedDot(true);
break;
continue;
}
if (this.checkPartyMemberProcessing(staffGridInfo.getGridId(), partyMemberProcessingList)) {
staffGridInfo.setRedDot(true);
break;
continue;
}
if (this.checkIssueProcessing(staffGridInfo.getGridId(), issueProcessingList)) {
staffGridInfo.setRedDot(true);
break;
continue;
}
}
return gridList;

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.81
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.82
ports:
- "8095:8095"
network_mode: host # 使用现有网络

2
epmet-module/resi-group/resi-group-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.81</version>
<version>0.3.82</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId>

10
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java

@ -19,6 +19,7 @@ package com.epmet.modules.group.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.group.entity.ResiGroupEntity;
import com.epmet.resi.group.dto.group.GroupProcessingCountResultDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.form.*;
import com.epmet.resi.group.dto.group.result.*;
@ -226,4 +227,13 @@ public interface ResiGroupDao extends BaseDao<ResiGroupEntity> {
* @Date 2020/11/23 10:07
**/
List<ResiGroupDTO> selectListByIds(@Param("groupIds") List<String> groupIds);
/**
* @return java.util.List<com.epmet.resi.group.dto.group.GroupProcessingCountResultDTO>
* @param gridIdList
* @author yinzuomei
* @description 根据网格id查询返回每个网格的待审核小组总数+变更小组信息申请数
* @Date 2020/12/25 13:18
**/
List<GroupProcessingCountResultDTO> queryGroupProcessingCount(@Param("gridIdList") List<String> gridIdList);
}

31
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -28,10 +28,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.ImgTaskDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
@ -75,8 +71,8 @@ import com.epmet.resi.group.dto.group.result.*;
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO;
import com.github.pagehelper.PageHelper;
import com.epmet.resi.group.dto.member.form.EditAuditSwitchFormDTO;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -461,8 +457,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
resiGroupStatisticalService.save(resiGroupStatisticalDTO);
//发送消息:创建小组
sendMsgResi2Gov(UserMessageConstant.CREATE_GROUP_APPLYING_MSG_TITLE,msg,applyCreateGroupFormDTO.getGridId(),applyCreateGroupFormDTO.getUserId(),applyCreateGroupFormDTO.getCustomerId());
//更新政府端:工作-基层治理-群组管理reddot
resiGroupRedis.addWorkGrassrootsGroupRedDotValue(applyCreateGroupFormDTO.getGridId());
}
@ -642,8 +636,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>();
msgList.add(wxSubscribeMessageFormDTO);
epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
//更新政府端:工作-基层治理-党员认证reddot
resiGroupRedis.subtractWorkGrassrootsPartyAuthRedDotValue(resiGroupDTO.getGridId());
return new Result();
}
@ -702,8 +694,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
msgList.add(wxSubscribeMessageFormDTO);
epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
//更新政府端:工作-基层治理-党员认证reddot
resiGroupRedis.subtractWorkGrassrootsPartyAuthRedDotValue(resiGroupDTO.getGridId());
return new Result();
}
@ -908,21 +898,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
@Override
public List<GroupProcessingCountResultDTO> queryGroupProcessingCount(List<String> gridIdList) {
List<GroupProcessingCountResultDTO> list=new ArrayList<>();
for(String gridId:gridIdList){
GroupProcessingCountResultDTO resultDTO=new GroupProcessingCountResultDTO();
resultDTO.setGridId(gridId);
Integer auditingCreateGroupCount=Optional.ofNullable(resiGroupRedis.getWorkGrassrootsGroupRedDotValue(gridId)).orElse(NumConstant.ZERO);
Integer auditingGroupEditRecordCount=Optional.ofNullable(groupEditSubmitRecordDao.selectCountAuditingRec(gridId)).orElse(NumConstant.ZERO);
Integer auditingCount=auditingCreateGroupCount+auditingGroupEditRecordCount;
if (null == auditingCount) {
resultDTO.setCount(0);
} else {
resultDTO.setCount(auditingCount);
}
list.add(resultDTO);
if(CollectionUtils.isEmpty(gridIdList)){
return Collections.EMPTY_LIST;
}
return list;
return baseDao.queryGroupProcessingCount(gridIdList);
}
@ -1230,7 +1209,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), EpmetErrorCode.GROUP_EDIT_ERROR.getMsg());
}
resiGroupRedis.addWorkGrassrootsGroupRedDotValue(group.getGridId());
}
@ -1417,7 +1395,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
_update.setId(param.getGroupId());
baseDao.updateById(_update);
}
resiGroupRedis.subtractWorkGrassrootsPartyAuthRedDotValue(edit.getGridId());
resiGroupRedis.delGroup(param.getGroupId());
}

44
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -470,4 +470,48 @@
</foreach>
</if>
</select>
<!-- 根据网格id查询,返回每个网格的待审核小组总数+变更小组信息申请数 -->
<select id="queryGroupProcessingCount" parameterType="map" resultType="com.epmet.resi.group.dto.group.GroupProcessingCountResultDTO">
SELECT
temp.gridId,
sum( total ) AS count
FROM
(
SELECT
rg.GRID_ID AS gridId,
count(*) AS total
FROM
resi_group rg
WHERE
rg.DEL_FLAG = '0'
AND rg.STATE = 'under_auditting'
<if test="gridIdList!=null and gridIdList.size()!=0">
AND rg.GRID_ID IN
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
GROUP BY
rg.GRID_ID
UNION ALL
SELECT
m.GRID_ID AS gridId,
count( 1 ) AS total
FROM
group_edit_submit_record m
WHERE
m.DEL_FLAG = '0'
AND m.AUDIT_STATUS = 'under_auditing'
<if test="gridIdList!=null and gridIdList.size()!=0">
AND m.GRID_ID IN
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
group by m.GRID_ID
) temp
GROUP BY
temp.gridId
</select>
</mapper>

2
epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-partymember-server:
container_name: resi-partymember-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.61
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.62
ports:
- "8096:8096"
network_mode: host # 使用现有网络

2
epmet-module/resi-partymember/resi-partymember-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.61</version>
<version>0.3.62</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-partymember</artifactId>

11
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java

@ -24,7 +24,9 @@ import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO;
import com.epmet.resi.partymember.dto.partymember.form.CertifiedDetailFormDTO;
import com.epmet.resi.partymember.dto.partymember.form.CertifiedFormDTO;
import com.epmet.resi.partymember.dto.partymember.result.CertifiedDetailResultDTO;
import com.epmet.resi.partymember.dto.partymember.result.PartyAuthProcessingCountResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -75,4 +77,13 @@ public interface PartymemberInfoDao extends BaseDao<PartymemberInfoEntity> {
* @Date 2020/7/22 12:19
**/
PartymemberInfoDTO queryPartymemberInfoByUserId(String userId);
/**
* @return java.util.List<com.epmet.resi.partymember.dto.partymember.result.PartyAuthProcessingCountResultDTO>
* @param gridIdList
* @author yinzuomei
* @description 返回各个网格内待审核的党员数
* @Date 2020/12/25 14:02
**/
List<PartyAuthProcessingCountResultDTO> selectCountAuditting(@Param("gridIdList") List<String> gridIdList);
}

7
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -25,7 +25,6 @@ import com.epmet.modules.partymember.redis.PartymemberInfoRedis;
import com.epmet.modules.partymember.service.*;
import com.epmet.modules.warmhearted.constant.ResiWarmheartedConstant;
import com.epmet.modules.warmhearted.constant.ResiWarmheartedVisitConstant;
import com.epmet.redis.ResiPartyMemberRedis;
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO;
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO;
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO;
@ -81,8 +80,6 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
@Autowired
private GovOrgFeignClient govOrgFeignClient;
@Autowired
private ResiPartyMemberRedis resiPartyMemberRedis;
@Autowired
private ResiGroupFeignClient resiGroupFeignClient;
@Autowired
private PartymemberAuthRecordService partymemberAuthRecordService;
@ -311,8 +308,6 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
}
auditMessageToGov(ConvertUtils.sourceToTarget(partyMemberInfo, PartymemberInfoEntity.class), PartyMemberMessageConstant.MEMBER_APPLY_MSG);
//更新政府端:工作-基层治理-党员认证reddot
resiPartyMemberRedis.addWorkGrassrootsPartyAuthRedDotValue(infoDTO.getGridId());
return new Result();
}
@ -358,8 +353,6 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
} else {
auditMessageToResi(partyMemberInfoEntity, PartyMemberMessageConstant.AUDIT_REJECT_MSG);
}
//更新政府端:工作-基层治理-党员认证reddot
resiPartyMemberRedis.subtractWorkGrassrootsPartyAuthRedDotValue(manualEntity.getGridId());
return new Result();
}

21
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java

@ -45,11 +45,9 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 党员认证信息表
@ -204,19 +202,10 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl<PartymemberInfoD
@Override
public List<PartyAuthProcessingCountResultDTO> queryPartyMemberProcessingCount(List<String> gridIdList) {
List<PartyAuthProcessingCountResultDTO> list = new ArrayList<>();
for (String gridId : gridIdList) {
PartyAuthProcessingCountResultDTO partyAuthProcessingCountResultDTO = new PartyAuthProcessingCountResultDTO();
partyAuthProcessingCountResultDTO.setGridId(gridId);
Integer auditingPartyMember = resiPartyMemberRedis.queryPartyAuthProcessingCount(gridId);
if (null == auditingPartyMember) {
partyAuthProcessingCountResultDTO.setCount(0);
} else {
partyAuthProcessingCountResultDTO.setCount(auditingPartyMember);
}
list.add(partyAuthProcessingCountResultDTO);
if(CollectionUtils.isEmpty(gridIdList)){
return Collections.EMPTY_LIST;
}
return list;
return baseDao.selectCountAuditting(gridIdList);
}
/**

11
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/dao/ResiWarmheartedApplyDao.java

@ -23,8 +23,10 @@ import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditedFromDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiProcessingCountResultDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -52,4 +54,13 @@ public interface ResiWarmheartedApplyDao extends BaseDao<ResiWarmheartedApplyEnt
* @return
*/
List<ResiWarmAuditResultDTO> selectResiWarmAuditList(ResiWarmAuditFormDTO formDTO);
/**
* @return java.util.List<com.epmet.resi.partymember.dto.warmhearted.result.ResiProcessingCountResultDTO>
* @param gridIdList
* @author yinzuomei
* @description 根据网格id,返回各个网格内待审核的热心居民申请总数
* @Date 2020/12/25 13:54
**/
List<ResiProcessingCountResultDTO> selectCountAuditting(@Param("gridIdList") List<String> gridIdList);
}

19
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java

@ -27,7 +27,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.PartyMemberConstant;
@ -51,7 +50,6 @@ import com.epmet.modules.warmhearted.dao.ResiWarmheartedApplyDao;
import com.epmet.modules.warmhearted.entity.ResiWarmheartedApplyEntity;
import com.epmet.modules.warmhearted.service.ResiWarmheartedApplyService;
import com.epmet.modules.warmhearted.service.ResiWarmheartedVisitService;
import com.epmet.redis.ResiPartyMemberRedis;
import com.epmet.resi.partymember.dto.ResiIdentityFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.*;
@ -65,6 +63,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
@ -92,8 +91,6 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
@Autowired
private GovOrgFeignClient govOrgFeignClient;
@Autowired
private ResiPartyMemberRedis resiPartyMemberRedis;
@Autowired
private ResiGroupFeignClient resiGroupFeignClient;
@Override
@ -216,8 +213,6 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
}
result.setCode(NumConstant.ZERO);
result.setMsg(ResiWarmheartedVisitConstant.RESI_WARM_SUBMIT);
//更新政府端:工作-基层治理-居民管理reddot
resiPartyMemberRedis.addWorkGrassrootsResiRedDotValue(formDTO.getGridId());
}
return result;
}
@ -419,8 +414,6 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
result = epmetUserFeignClient.saveUserRole(dto);
//3:为申请人发送审核通过消息提示
result = auditMessage(entity, ResiWarmUserMessageConstant.AUDIT_APPROVE_MSG);
//4:更新政府端:工作-基层治理-居民管理reddot
resiPartyMemberRedis.subtractWorkGrassrootsResiRedDotValue(entity.getGridId());
//5:更新这个人注册热心居民的网格下的所在的组的热心居民数信息
ResiIdentityFormDTO identityParam = new ResiIdentityFormDTO();
identityParam.setUserId(entity.getUserId());
@ -495,8 +488,6 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
//2:为申请人发送审核驳回消息提示
//查询申请信息
auditMessage(entity, ResiWarmUserMessageConstant.AUDIT_REJECT_MSG);
//3:更新政府端:工作-基层治理-居民管理reddot
resiPartyMemberRedis.subtractWorkGrassrootsResiRedDotValue(entity.getGridId());
return result;
}
@ -541,7 +532,8 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
@Override
public List<ResiProcessingCountResultDTO> queryResiProcessingCount(List<String> gridIdList) {
List<ResiProcessingCountResultDTO> list = new ArrayList<>();
//代码废弃
/*List<ResiProcessingCountResultDTO> list = new ArrayList<>();
for (String gridId : gridIdList) {
ResiProcessingCountResultDTO resiProcessingCountResultDTO = new ResiProcessingCountResultDTO();
resiProcessingCountResultDTO.setGridId(gridId);
@ -552,7 +544,10 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea
resiProcessingCountResultDTO.setCount(auditingResi);
}
list.add(resiProcessingCountResultDTO);
}*/
if(CollectionUtils.isEmpty(gridIdList)){
return Collections.EMPTY_LIST;
}
return list;
return baseDao.selectCountAuditting(gridIdList);
}
}

20
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml

@ -115,4 +115,24 @@
order by pi.CREATED_TIME desc
limit 1
</select>
<!-- 返回各个网格内待审核的党员数 自动审核失败且填写了补充信息的-->
<select id="selectCountAuditting" parameterType="map" resultType="com.epmet.resi.partymember.dto.partymember.result.PartyAuthProcessingCountResultDTO">
SELECT
pi.GRID_ID AS gridId,
count(*) AS count
FROM
partymember_info pi
WHERE
pi.DEL_FLAG = '0'
AND pi.CONFIRM_RESULT = 'auto_confirm_failed'
AND pi.EXTRA_ORGANIZATION IS NOT NULL
<if test="gridIdList!=null and gridIdList.size()!=0">
AND pi.GRID_ID IN
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
group by pi.GRID_ID
</select>
</mapper>

18
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml

@ -100,4 +100,22 @@
LIMIT #{pageNo}, #{pageSize}
</select>
<!-- 根据网格id,返回各个网格内待审核的热心居民申请总数 -->
<select id="selectCountAuditting" parameterType="map" resultType="com.epmet.resi.partymember.dto.warmhearted.result.ResiProcessingCountResultDTO">
SELECT
m.GRID_ID AS gridId,
count(*) AS count
FROM
resi_warmhearted_apply m
WHERE
m.DEL_FLAG = '0'
AND m.AUDIT_STATUS = 'under_auditting'
<if test="gridIdList!=null and gridIdList.size()!=0">
AND m.GRID_ID IN
<foreach collection="gridIdList" item="gridId" open="(" close=")" separator=",">
#{gridId}
</foreach>
</if>
group by m.GRID_ID
</select>
</mapper>

16
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>epmet-openapi-adv</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>epmet-openapi-adv-client</artifactId>
</project>

11
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/Dockerfile

@ -0,0 +1,11 @@
FROM java:8
RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./epmet-openapi-adv.jar
EXPOSE 8115
ENTRYPOINT ["sh", "-c", "exec $RUN_INSTRUCT"]

18
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-dev.yml

@ -0,0 +1,18 @@
version: "3.7"
services:
epmet-openapi-adv-server:
container_name: epmet-openapi-adv-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-openapi-adv-server:version_placeholder
ports:
- "8015:8015"
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-adv.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 300M

18
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml

@ -0,0 +1,18 @@
version: "3.7"
services:
epmet-openapi-adv-server:
container_name: epmet-openapi-adv-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-adv-server:0.3.3
ports:
- "8015:8015"
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-openapi-adv.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 600M

18
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-test.yml

@ -0,0 +1,18 @@
version: "3.7"
services:
epmet-openapi-adv-server:
container_name: epmet-openapi-adv-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-openapi-adv-server:version_placeholder
ports:
- "8015:8015"
network_mode: host # 不会创建新的网络
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-adv.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 300M

227
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.3</version>
<parent>
<artifactId>epmet-openapi-adv</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>epmet-openapi-adv-server</artifactId>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-mybatis</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<server.port>8115</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_adv?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_adv_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8115</server.port>
<spring.profiles.active>local</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://118.190.150.119:47306/epmet_adv?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_adv_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>118.190.150.119</spring.redis.host>
<spring.redis.port>47379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
</properties>
</profile>
<profile>
<id>test</id>
<!-- <activation>
<activeByDefault>true</activeByDefault>
</activation>-->
<properties>
<server.port>8115</server.port>
<spring.profiles.active>test</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_adv?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr>
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<server.port>8115</server.port>
<spring.profiles.active>prod</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_adv?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_adv_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtclOUdrEdIs!Q2w</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.11.180:8848</nacos.server-addr>
<nacos.discovery.namespace>bd205d23-e696-47be-b995-916313f86e99</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<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>
</project>

15
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/AdvApplication.java

@ -0,0 +1,15 @@
package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class AdvApplication {
public static void main(String[] args) {
SpringApplication.run(AdvApplication.class, args);
}
}

40
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/aspect/RequestLogAspect.java

@ -0,0 +1,40 @@
package com.epmet.adv.aspect;
import com.epmet.commons.tools.aspect.BaseRequestLogAspect;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 日志/异常处理切面实现调用父类方法完成日志记录和异常处理
*/
@Aspect
@Component
@Order(0)
public class RequestLogAspect extends BaseRequestLogAspect {
@Override
@Around(value = "execution(* com.epmet.adv.controller.*Controller*.*(..)) ")
public Object proceed(ProceedingJoinPoint point) throws Throwable {
return super.proceed(point, getRequest());
}
/**
* 获取Request对象
*
* @return
*/
private HttpServletRequest getRequest() {
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) ra;
return sra.getRequest();
}
}

26
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/config/ModuleConfigImpl.java

@ -0,0 +1,26 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.adv.config;
import com.epmet.commons.tools.config.ModuleConfig;
import org.springframework.stereotype.Service;
/**
* 模块配置信息
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Service
public class ModuleConfigImpl implements ModuleConfig {
@Override
public String getName() {
return "adv";
}
}

28
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java

@ -0,0 +1,28 @@
package com.epmet.adv.controller;
import com.epmet.adv.entity.AdvVedioEntity;
import com.epmet.adv.service.AdvVedioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
@Controller
@RequestMapping("video")
public class AdvVideoController {
@Autowired
private AdvVedioService advVedioService;
@GetMapping("company-adv")
public String toVedio() throws IOException {
AdvVedioEntity enableAdvVedioEntity = advVedioService.getEnableAdvVedioEntity();
String redirectUrl = enableAdvVedioEntity != null ? enableAdvVedioEntity.getPath() : "404";
return String.format("redirect:%s", redirectUrl);
//response.sendRedirect("www.baidu.com");
}
}

33
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.adv.dao;
import com.epmet.adv.entity.AdvVedioEntity;
import com.epmet.commons.mybatis.dao.BaseDao;
import org.apache.ibatis.annotations.Mapper;
/**
* 宣传视频
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-30
*/
@Mapper
public interface AdvVedioDao extends BaseDao<AdvVedioEntity> {
AdvVedioEntity getEnableAdvVedioEntity();
}

56
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/entity/AdvVedioEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.adv.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 宣传视频
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-12-30
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("adv_vedio")
public class AdvVedioEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 存储路径
*/
private String path;
/**
* 存储类型aliyun_oss,local
*/
private String storeType;
/**
* 是否启用
*/
private Integer enable;
}

7
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/AdvVedioService.java

@ -0,0 +1,7 @@
package com.epmet.adv.service;
import com.epmet.adv.entity.AdvVedioEntity;
public interface AdvVedioService {
AdvVedioEntity getEnableAdvVedioEntity();
}

18
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/impl/AdvVedioServiceImpl.java

@ -0,0 +1,18 @@
package com.epmet.adv.service.impl;
import com.epmet.adv.dao.AdvVedioDao;
import com.epmet.adv.entity.AdvVedioEntity;
import com.epmet.adv.service.AdvVedioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AdvVedioServiceImpl implements AdvVedioService {
@Autowired
private AdvVedioDao advVedioDao;
public AdvVedioEntity getEnableAdvVedioEntity() {
return advVedioDao.getEnableAdvVedioEntity();
}
}

139
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml

@ -0,0 +1,139 @@
server:
port: @server.port@
servlet:
context-path: /adv
spring:
main:
allow-bean-definition-overriding: true
application:
name: epmet-openapi-adv-server
#环境 dev|test|prod
profiles:
active: @spring.profiles.active@
messages:
encoding: UTF-8
basename: i18n/messages_common
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
redis:
database: @spring.redis.index@
host: @spring.redis.host@
port: @spring.redis.port@
password: @spring.redis.password@
timeout: 30s
datasource:
druid:
#MySQL
driver-class-name: com.mysql.cj.jdbc.Driver
url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@
initial-size: 10
max-active: 100
min-idle: 10
max-wait: 60000
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
#Oracle需要打开注释
#validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
filter:
stat:
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: false
wall:
config:
multi-statement-allow: true
# 数据迁移工具flyway
flyway:
enabled: @spring.flyway.enabled@
locations: classpath:db/migration
url: @spring.datasource.druid.url@
user: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@
baseline-on-migrate: true
baseline-version: 0
cloud:
nacos:
discovery:
server-addr: @nacos.server-addr@
#nacos的命名空间ID,默认是public
namespace: @nacos.discovery.namespace@
#不把自己注册到注册中心的地址
register-enabled: @nacos.register-enabled@
ip: @nacos.ip@
config:
enabled: @nacos.config-enabled@
server-addr: @nacos.server-addr@
namespace: @nacos.config.namespace@
group: @nacos.config.group@
file-extension: yaml
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.epmet.entity
global-config:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: ID_WORKER
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换
column-underline: true
banner: false
#原生配置
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
jdbc-type-for-null: 'null'
feign:
hystrix:
enabled: true
client:
config:
default:
loggerLevel: BASIC
httpclient:
enabled: true
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 60000 #缺省为1000
ribbon:
ReadTimeout: 300000
ConnectTimeout: 300000
#pageHelper分页插件
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

18
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/db/migration/V0.0.1__createAdvVedio.sql

@ -0,0 +1,18 @@
-- create database epmet_adv default character set utf8mb4;
-- CREATE USER epmet_adv_user@'%' IDENTIFIED BY 'EpmEt-db-UsEr';
-- GRANT ALL ON `epmet_adv%`.* TO 'epmet_adv_user'@'%';
-- flush privileges;
CREATE TABLE `adv_vedio` (
`ID` varchar(64) NOT NULL COMMENT 'id' primary key ,
`PATH` varchar(255) NOT NULL COMMENT '存储路径',
`STORE_TYPE` varchar(30) NOT NULL COMMENT '存储类型。aliyun_oss,local',
`ENABLE` tinyint(1) NOT NULL COMMENT '是否启用',
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁',
`DEL_FLAG` int(11) unsigned DEFAULT NULL COMMENT '删除标识 0:未删除 1:删除',
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建者',
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新者',
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宣传视频'

169
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/logback-spring.xml

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<property name="log.path" value="logs/adv"/>
<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>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--1. 输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--2. 输出到文档-->
<!-- 2.1 level为 DEBUG 日志,时间滚动输出 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文档的路径及文档名 -->
<file>${log.path}/debug.log</file>
<!--日志文档输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 2.2 level为 INFO 日志,时间滚动输出 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文档的路径及文档名 -->
<file>${log.path}/info.log</file>
<!--日志文档输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 2.3 level为 WARN 日志,时间滚动输出 -->
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文档的路径及文档名 -->
<file>${log.path}/warn.log</file>
<!--日志文档输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 2.4 level为 ERROR 日志,时间滚动输出 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文档的路径及文档名 -->
<file>${log.path}/error.log</file>
<!--日志文档输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录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>
</appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.dao" level="INFO"/>
<logger name="com.epmet.dao" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="INFO_FILE"/>
<appender-ref ref="WARN_FILE"/>
<appender-ref ref="ERROR_FILE"/>
</root>
</springProfile>
<!-- 生产环境 -->
<springProfile name="prod">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.dao" level="INFO"/>
<root level="INFO">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="INFO_FILE"/>
<appender-ref ref="WARN_FILE"/>
<appender-ref ref="ERROR_FILE"/>
</root>
</springProfile>
</configuration>

35
epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/mapper/AdvVedioDao.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.adv.dao.AdvVedioDao">
<resultMap type="com.epmet.adv.entity.AdvVedioEntity" id="entityMap">
<result property="id" column="ID"/>
<result property="path" column="PATH"/>
<result property="storeType" column="STORE_TYPE"/>
<result property="enable" column="ENABLE"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getEnableAdvVedioEntity" resultMap="entityMap">
select id,
path,
store_type,
enable,
revision,
del_flag,
created_by,
created_time,
updated_by,
updated_time
from adv_vedio
where ENABLE = 1
limit 1;
</select>
</mapper>

21
epmet-openapi/epmet-openapi-adv/pom.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>epmet-openapi</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
</parent>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<artifactId>epmet-openapi-adv</artifactId>
<modules>
<module>epmet-openapi-adv-client</module>
<module>epmet-openapi-adv-server</module>
</modules>
</project>

1
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java

@ -12,6 +12,7 @@ import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.aliyuncs.http.MethodType;
import com.epmet.commons.tools.utils.Result;
import com.epmet.openapi.scan.common.constant.SysConstant;
import com.epmet.openapi.scan.common.enu.*;

1
epmet-openapi/pom.xml

@ -13,6 +13,7 @@
<artifactId>epmet-openapi</artifactId>
<modules>
<module>epmet-openapi-scan</module>
<module>epmet-openapi-adv</module>
</modules>
</project>
Loading…
Cancel
Save