From 5cb28b6251a4a5e8f9020a86091a197b888f63ee Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 23 Dec 2020 15:37:02 +0800 Subject: [PATCH 01/27] =?UTF-8?q?=E5=A4=96=E6=8C=82=E6=8E=A5=E5=8F=A3-?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=AB=99=E5=86=85=E4=BF=A1=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/WxmpMessageExtServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java index f9d1e17a67..2361a82db2 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java @@ -50,9 +50,10 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { if (ExtConstant.APP_RESI.equals(dto.getApp())){ wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_RESI); } - if (ExtConstant.APP_GOV.equals(dto.getApp())){ + //2020.12.23 sun 数据库字段key值有work改成gov 外挂接口直接传的gov不用再转换 + /*if (ExtConstant.APP_GOV.equals(dto.getApp())){ wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_WORK); - } + }*/ wxSubscribeMessageFormDTO.setBehaviorType(dto.getTitle()); wxSubscribeMessageFormDTO.setMessageTime(new Date()); wxmpMsgList.add(wxSubscribeMessageFormDTO); From 85f243c2c91fa7f24501aa4a96f925728f05d18b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 23 Dec 2020 15:44:52 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E5=A4=96=E6=8C=82=E6=8E=A5=E5=8F=A3-?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=AB=99=E5=86=85=E4=BF=A1=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-message-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-message/epmet-message-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml index 6e122b14b9..23750b4168 100644 --- a/epmet-module/epmet-message/epmet-message-server/deploy/docker-compose-prod.yml +++ b/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 # 使用现有网络 diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index 1e0b1a01c5..6a10b4724d 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.32 + 0.3.33 com.epmet epmet-message From 678ee795b890908327c09289a115430305b0d1f9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 23 Dec 2020 16:20:18 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E5=A4=96=E6=8C=82bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/WxmpMessageExtServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java index 2361a82db2..4dc7c78948 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java @@ -51,9 +51,9 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { 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); - }*/ + if (ExtConstant.APP_GOV.equals(dto.getApp())){ + wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_GOV); + } wxSubscribeMessageFormDTO.setBehaviorType(dto.getTitle()); wxSubscribeMessageFormDTO.setMessageTime(new Date()); wxmpMsgList.add(wxSubscribeMessageFormDTO); From ff0b274b4551023d94fb8a96f1165145e1a5cdd1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 25 Dec 2020 13:29:37 +0800 Subject: [PATCH 04/27] =?UTF-8?q?=E5=B0=86=E9=A1=B9=E7=9B=AE-=E8=8A=82?= =?UTF-8?q?=E7=82=B9-=E8=80=97=E6=97=B6=E6=8A=BD=E5=8F=96=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=85=A8=E9=87=8F=E5=88=A0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/ProjectExtractServiceImpl.java | 9 ++------- .../com/epmet/service/project/ProjectProcessService.java | 3 +-- .../service/project/impl/ProjectProcessServiceImpl.java | 9 ++------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 452edc9665..63b158e72c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/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 extractData = - projectProcessService.getProjectPeriodDirectly(isFirst, param.getCustomerId(), param.getDateId()); + projectProcessService.getProjectPeriodDirectly(param.getCustomerId(), param.getDateId()); List formattingData = new LinkedList<>(); extractData.forEach(original -> { FactOriginProjectOrgPeriodDailyEntity dest diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 36409f2927..5a27fdca62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/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 /** * @Description 直接从项目业务改造获取项目节点耗时信息 - * @param isFirst * @param customerId * @param date * @return java.util.List * @author wangc * @date 2020.10.23 09:10 */ - List getProjectPeriodDirectly(Boolean isFirst,String customerId, String date); + List getProjectPeriodDirectly(String customerId, String date); /** * 获取办结组织 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index 09d3d2f652..d45bad78ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/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 getProjectPeriodDirectly(Boolean isFirst, String customerId, String date) { - if(isFirst){ - return baseDao.selectProjectOrgPeriodDirectly(customerId,null,null); - }else{ - return baseDao.selectProjectOrgPeriodDirectly(customerId,null,date); - } - + public List getProjectPeriodDirectly( String customerId, String date) { + return baseDao.selectProjectOrgPeriodDirectly(customerId,null,null); } @Override From 251e1e0e43cc431458b13fdb3fc8d4fb9b48235f Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 25 Dec 2020 13:39:31 +0800 Subject: [PATCH 05/27] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=20?= =?UTF-8?q?=20=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9D=97=20=20data-stats=20=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7=20=20=20=2079=20->=20=2080?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index 075794d502..ccb7cfd518 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/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.80 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 473882d35a..d0da071622 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.79 + 0.3.80 data-statistical com.epmet From 4af252cd09ec98cbaca34dd6360a6c5b32fd883a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 25 Dec 2020 16:16:28 +0800 Subject: [PATCH 06/27] =?UTF-8?q?=E5=9F=BA=E5=B1=82=E6=B2=BB=E7=90=86-?= =?UTF-8?q?=E7=BA=A2=E7=82=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/RedDotDetialDTO.java | 26 ++++ .../com/epmet/dto/result/RedDotResultDTO.java | 1 + .../epmet/controller/RemindController.java | 3 +- .../java/com/epmet/service/RemindService.java | 10 ++ .../epmet/service/impl/RemindServiceImpl.java | 141 ++++++++++++++++-- .../src/main/java/com/epmet/dao/IssueDao.java | 9 ++ .../epmet/service/impl/IssueServiceImpl.java | 23 +-- .../src/main/resources/mapper/IssueDao.xml | 44 ++++++ .../service/impl/StaffAgencyServiceImpl.java | 9 +- .../epmet/modules/group/dao/ResiGroupDao.java | 10 ++ .../service/impl/ResiGroupServiceImpl.java | 31 +--- .../resources/mapper/group/ResiGroupDao.xml | 44 ++++++ .../partymember/dao/PartymemberInfoDao.java | 11 ++ .../impl/PartyMemberConfirmServiceImpl.java | 7 - .../impl/PartymemberInfoServiceImpl.java | 21 +-- .../dao/ResiWarmheartedApplyDao.java | 11 ++ .../impl/ResiWarmheartedApplyServiceImpl.java | 19 +-- .../mapper/partymember/PartymemberInfoDao.xml | 19 +++ .../warmhearted/ResiWarmheartedApplyDao.xml | 18 +++ 19 files changed, 360 insertions(+), 97 deletions(-) create mode 100644 epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotDetialDTO.java diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotDetialDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotDetialDTO.java new file mode 100644 index 0000000000..c9c1f25988 --- /dev/null +++ b/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; + } +} diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotResultDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotResultDTO.java index 9255f78771..806c96a3d4 100644 --- a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/result/RedDotResultDTO.java +++ b/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 functionList; + private List details; } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java index 894fa60ab7..c96be4e5db 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/RemindController.java @@ -32,7 +32,8 @@ public class RemindController { public Result 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().ok(redDotResultDTO); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/RemindService.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/RemindService.java index 95c577b5ca..e16ad8307e 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/RemindService.java +++ b/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); } diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java index fa007c0cd5..49c0fb8129 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java +++ b/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> 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 gridList = govOrgResult.getData(); logger.info("我的网格列表"+gridList.size()); @@ -76,18 +82,23 @@ public class RemindServiceImpl implements RemindService { List functionList = new ArrayList<>(); List 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> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId()); + + if (govOrgResult.success() && !CollectionUtils.isEmpty(govOrgResult.getData())) { + List functionList = new ArrayList<>(); + List details = new ArrayList<>(); + List gridIdList = govOrgResult.getData().stream().map(CustomerGridByUserIdResultDTO::getGridId).collect(Collectors.toList()); + + //1、群组管理(待审核的小组申请、变更小组申请) + Result> 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> 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> 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> 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> 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; + } + + + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 4071e7fb30..e1f1e0f476 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -207,4 +207,13 @@ public interface IssueDao extends BaseDao { * @return java.util.List */ List selectClosedListByTopic(AllIssueFormDTO formDTO); + + /** + * @return java.util.List + * @param gridIdList + * @author yinzuomei + * @description 返回各个网格内(待审核+表决中)议题总数 + * @Date 2020/12/25 14:12 + **/ + List selectIssueRedDot(@Param("gridIdList") List gridIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index afa7f9782f..f36ffe907b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/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 imp @Override public List queryVotingIssueCount(List gridIdList) { - List 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 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 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 imp logger.error("议题转项目,推送微信订阅消息失败!"); } - //6:缓存中网格下表决中的议题总数减1 - govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); try{ issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null); }catch(RenException e){ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 9c4b676771..3a4492eed1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -513,4 +513,48 @@ ORDER BY CREATED_TIME DESC + + \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java index 6c42e6e7dc..619655b8df 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java +++ b/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; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java index cdb6a245a9..9a11aa39c2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java +++ b/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 { * @Date 2020/11/23 10:07 **/ List selectListByIds(@Param("groupIds") List groupIds); + + /** + * @return java.util.List + * @param gridIdList + * @author yinzuomei + * @description 根据网格id查询,返回每个网格的待审核小组总数+变更小组信息申请数 + * @Date 2020/12/25 13:18 + **/ + List queryGroupProcessingCount(@Param("gridIdList") List gridIdList); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 5a2a9915cb..0f64fe67d7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/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 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 queryGroupProcessingCount(List gridIdList) { - List 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 + + + diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java index 53854d8253..660cbfa957 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberInfoDao.java +++ b/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 { * @Date 2020/7/22 12:19 **/ PartymemberInfoDTO queryPartymemberInfoByUserId(String userId); + + /** + * @return java.util.List + * @param gridIdList + * @author yinzuomei + * @description 返回各个网格内待审核的党员数 + * @Date 2020/12/25 14:02 + **/ + List selectCountAuditting(@Param("gridIdList") List gridIdList); } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index aa77bd8eae..c30e9aca9f 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/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(); } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java index 0aea73c30b..ddc22a04b1 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java +++ b/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 queryPartyMemberProcessingCount(List gridIdList) { - List 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); } /** diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/dao/ResiWarmheartedApplyDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/dao/ResiWarmheartedApplyDao.java index 5467173db1..5c3a08df25 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/dao/ResiWarmheartedApplyDao.java +++ b/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 selectResiWarmAuditList(ResiWarmAuditFormDTO formDTO); + + /** + * @return java.util.List + * @param gridIdList + * @author yinzuomei + * @description 根据网格id,返回各个网格内待审核的热心居民申请总数 + * @Date 2020/12/25 13:54 + **/ + List selectCountAuditting(@Param("gridIdList") List gridIdList); } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java index cc6d73e9f0..233a81d423 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedApplyServiceImpl.java +++ b/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 queryResiProcessingCount(List gridIdList) { - List list = new ArrayList<>(); + //代码废弃 + /*List list = new ArrayList<>(); for (String gridId : gridIdList) { ResiProcessingCountResultDTO resiProcessingCountResultDTO = new ResiProcessingCountResultDTO(); resiProcessingCountResultDTO.setGridId(gridId); @@ -552,7 +544,10 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl + + + \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml index 7056d086e8..c80ef467cc 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/warmhearted/ResiWarmheartedApplyDao.xml @@ -100,4 +100,22 @@ LIMIT #{pageNo}, #{pageSize} + + \ No newline at end of file From 01d208f7e57fdf2d869736848b7c46d0b7653a1b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 25 Dec 2020 17:40:13 +0800 Subject: [PATCH 07/27] =?UTF-8?q?=E5=BE=85=E5=AE=A1=E6=A0=B8=E5=85=9A?= =?UTF-8?q?=E5=91=98=E6=80=BB=E6=95=B0sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/partymember/PartymemberInfoDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml index fe062d7761..e47b1a142d 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partymember/PartymemberInfoDao.xml @@ -116,7 +116,7 @@ limit 1 - + + 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; + + + \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/pom.xml b/epmet-openapi/epmet-openapi-adv/pom.xml new file mode 100644 index 0000000000..a3ef89a4a8 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/pom.xml @@ -0,0 +1,15 @@ + + + + epmet-openapi + com.epmet + 2.0.0 + + 4.0.0 + + epmet-openapi-adv + + + \ No newline at end of file diff --git a/epmet-openapi/pom.xml b/epmet-openapi/pom.xml index 9db62073f3..fb9b091fd4 100644 --- a/epmet-openapi/pom.xml +++ b/epmet-openapi/pom.xml @@ -13,6 +13,9 @@ epmet-openapi epmet-openapi-scan + epmet-openapi-adv + epmet-openapi-adv/epmet-openapi-adv-client + epmet-openapi-adv/epmet-openapi-adv-server \ No newline at end of file From 754eaec1703c498149f240f1117194ce587c6b2a Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 30 Dec 2020 23:23:32 +0800 Subject: [PATCH 16/27] =?UTF-8?q?=E8=B0=83=E6=95=B4adv=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=97=E5=8C=85=E5=90=AB=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-openapi-adv/epmet-openapi-adv-client/pom.xml | 4 ++-- .../epmet-openapi-adv/epmet-openapi-adv-server/pom.xml | 3 ++- epmet-openapi/epmet-openapi-adv/pom.xml | 6 ++++++ epmet-openapi/pom.xml | 2 -- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml index 20e5c7aedd..5c57808384 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml @@ -3,10 +3,10 @@ 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"> - epmet-openapi + epmet-openapi-adv com.epmet 2.0.0 - ../../pom.xml + ../pom.xml 4.0.0 diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml index 7b7c38cc2e..6296aa9735 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml @@ -3,9 +3,10 @@ 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"> - epmet-openapi + epmet-openapi-adv com.epmet 2.0.0 + ../pom.xml 4.0.0 diff --git a/epmet-openapi/epmet-openapi-adv/pom.xml b/epmet-openapi/epmet-openapi-adv/pom.xml index a3ef89a4a8..13490687d1 100644 --- a/epmet-openapi/epmet-openapi-adv/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/pom.xml @@ -7,9 +7,15 @@ com.epmet 2.0.0 + pom 4.0.0 epmet-openapi-adv + + epmet-openapi-adv-client + epmet-openapi-adv-server + + \ No newline at end of file diff --git a/epmet-openapi/pom.xml b/epmet-openapi/pom.xml index fb9b091fd4..fd15705343 100644 --- a/epmet-openapi/pom.xml +++ b/epmet-openapi/pom.xml @@ -14,8 +14,6 @@ epmet-openapi-scan epmet-openapi-adv - epmet-openapi-adv/epmet-openapi-adv-client - epmet-openapi-adv/epmet-openapi-adv-server \ No newline at end of file From d9762d1641f3df2252f879fa002b6f67eee9fb9d Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 30 Dec 2020 23:26:17 +0800 Subject: [PATCH 17/27] =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-openapi-adv/epmet-openapi-adv-server/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml index 6296aa9735..9ea27452db 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml @@ -2,6 +2,8 @@ + + 0.3.1 epmet-openapi-adv com.epmet From b0990d0ea85882e1af141c03f05ccebe86a048a1 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 30 Dec 2020 23:29:38 +0800 Subject: [PATCH 18/27] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7+?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deploy/docker-compose-prod.yml | 2 +- .../epmet-openapi-adv/epmet-openapi-adv-server/pom.xml | 2 +- .../src/main/resources/bootstrap.yml | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml index f86e228bf0..7b26bf7c08 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ 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.1 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-adv-server:0.3.2 ports: - "8015:8015" network_mode: host # 不会创建新的网络 diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml index 9ea27452db..d39661cadc 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-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"> - 0.3.1 + 0.3.2 epmet-openapi-adv com.epmet diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml index 35096567e6..247b417689 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml @@ -133,14 +133,6 @@ pagehelper: helper-dialect: mysql reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 -openapi: - scan: - server: - url: @openapi.scan.server.url@ - method: - imgSyncScan: /imgSyncScan - textSyncScan: /textSyncScan - dingTalk: robot: webHook: @dingTalk.robot.webHook@ From fb1ce0df25d43a7ce730ede31ea15450de371017 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 30 Dec 2020 23:47:45 +0800 Subject: [PATCH 19/27] =?UTF-8?q?gateway-=E5=A2=9E=E5=8A=A0epmet-openapi-a?= =?UTF-8?q?dv=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 14 ++++++++++++++ epmet-gateway/src/main/resources/bootstrap.yml | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index a6b276158b..36b0025c32 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -205,6 +205,10 @@ lb://epmet-ext-server + + + lb://epmet-openapi-adv-server + @@ -324,6 +328,10 @@ lb://epmet-ext-server + + + lb://epmet-openapi-adv-server + @@ -416,6 +424,9 @@ lb://epmet-point-server lb://epmet-ext-server + + + lb://epmet-openapi-adv-server @@ -505,6 +516,9 @@ lb://epmet-point-server lb://epmet-ext-server + + + lb://epmet-openapi-adv-server diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 53ec286911..d77509cd82 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -323,6 +323,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@ From 901e62278ac5b5e753368f5442fcf672a83dc992 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 30 Dec 2020 23:48:42 +0800 Subject: [PATCH 20/27] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/deploy/docker-compose-prod.yml | 2 +- epmet-gateway/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-gateway/deploy/docker-compose-prod.yml b/epmet-gateway/deploy/docker-compose-prod.yml index 5750222b86..ebcdc7eafc 100644 --- a/epmet-gateway/deploy/docker-compose-prod.yml +++ b/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 # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 36b0025c32..2815788b30 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.42 + 0.3.43 com.epmet epmet-cloud From 7f50e2cdfa3b0a7b281aa77704aeca7e3ea9d689 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 31 Dec 2020 14:39:30 +0800 Subject: [PATCH 21/27] =?UTF-8?q?=E4=BF=AE=E6=94=B9url=E5=8D=95=E8=AF=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{AdvVedioController.java => AdvVideoController.java} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/{AdvVedioController.java => AdvVideoController.java} (93%) diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVedioController.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java similarity index 93% rename from epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVedioController.java rename to epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java index c8ea418fd5..5c032ad562 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVedioController.java +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java @@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RestController; import java.io.IOException; @Controller -@RequestMapping("vedio") -public class AdvVedioController { +@RequestMapping("video") +public class AdvVideoController { @Autowired private AdvVedioService advVedioService; From da628cb92b003a3c734c25eb57f2e9406528c258 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 31 Dec 2020 14:41:02 +0800 Subject: [PATCH 22/27] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-openapi-adv-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-openapi-adv/epmet-openapi-adv-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml index 7b26bf7c08..b5a13e04e3 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ 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.2 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-adv-server:0.3.3 ports: - "8015:8015" network_mode: host # 不会创建新的网络 diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml index d39661cadc..8dd1602e70 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-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"> - 0.3.2 + 0.3.3 epmet-openapi-adv com.epmet From 6e50cfdf21dc4d655a029ac7c35be6f84be6c470 Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 2 Jan 2021 20:22:31 +0800 Subject: [PATCH 23/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0helper-video=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 2 +- .../epmet/controller/HelperController.java | 23 +++++++++ .../java/com/epmet/dao/HelperVideoDao.java | 34 +++++++++++++ .../com/epmet/entity/HelperVideoEntity.java | 49 +++++++++++++++++++ .../com/epmet/service/HelperVideoService.java | 7 +++ .../service/impl/HelperVideoServiceImpl.java | 19 +++++++ .../migration/V0.0.8__createHelperVideo.sql | 18 +++++++ .../main/resources/mapper/HelperVideoDao.xml | 33 +++++++++++++ 8 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/HelperController.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/HelperVideoDao.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/HelperVideoEntity.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/HelperVideoService.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/HelperVideoServiceImpl.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.8__createHelperVideo.sql create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 36b0025c32..43cb9543e2 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -330,7 +330,7 @@ - lb://epmet-openapi-adv-server + lb://epmet-openapi-adv-server diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/HelperController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/HelperController.java new file mode 100644 index 0000000000..d06e522e77 --- /dev/null +++ b/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(); + } + +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/HelperVideoDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/HelperVideoDao.java new file mode 100644 index 0000000000..989989f347 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 getEnableHelperVideo(); +} \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/HelperVideoEntity.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/HelperVideoEntity.java new file mode 100644 index 0000000000..d94043acec --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/HelperVideoService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/HelperVideoService.java new file mode 100644 index 0000000000..63d348075c --- /dev/null +++ b/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(); +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/HelperVideoServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/HelperVideoServiceImpl.java new file mode 100644 index 0000000000..2de1313d45 --- /dev/null +++ b/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(); + } +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.8__createHelperVideo.sql b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.8__createHelperVideo.sql new file mode 100644 index 0000000000..bc17eca33d --- /dev/null +++ b/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='宣传视频' \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml new file mode 100644 index 0000000000..848e4de084 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/HelperVideoDao.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 71128aeca8094ab55578dba424b2193fe639d82e Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 2 Jan 2021 20:26:16 +0800 Subject: [PATCH 24/27] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common-service-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-common-service/common-service-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml index a023ca747e..bbf8441c97 100644 --- a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml +++ b/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 # 使用现有网络 diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index 47d3169b71..c863208d25 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.25 + 0.3.26 com.epmet epmet-common-service From b1eb4d07c05b83c0c0564dbe5099e4421d56fc5c Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 4 Jan 2021 09:52:46 +0800 Subject: [PATCH 25/27] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PublicPartExtractServiceImpl.java | 14 +++++++------- .../openapi/scan/service/impl/ScanServiceImpl.java | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 8e9dbd77be..dc5ba0ba2e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/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 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 issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(issueTotal)) { - log.error("抽取【公众参与-人均议题】,获取议题增量为空"); + log.error("抽取【公众参与-人均议题】,获取议题增量为空,客户Id:{}", formDTO.getCustomerId()); return; } List userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(userCountList)) { - log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); + log.error("抽取【公众参与-人均议题】,获取注册用户数为空,客户Id:{}", formDTO.getCustomerId()); return; } Map userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); @@ -143,7 +143,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { //获取每个网格的应表决人数 List 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 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 userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); Set 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 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())); diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java index 2a5db725e2..3ee213569b 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java +++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java @@ -8,6 +8,7 @@ import com.aliyuncs.green.model.v20180509.ImageSyncScanRequest; import com.aliyuncs.green.model.v20180509.TextScanRequest; import com.aliyuncs.http.FormatType; import com.aliyuncs.http.HttpResponse; +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.ImgSceneEnum; @@ -152,7 +153,7 @@ public class ScanServiceImpl implements ScanService { private ImageSyncScanRequest getImgScanRequest() { ImageSyncScanRequest imageSyncScanRequest = new ImageSyncScanRequest(); imageSyncScanRequest.setAcceptFormat(FormatType.JSON); // 指定api返回格式 - imageSyncScanRequest.setMethod(com.aliyuncs.http.MethodType.POST); // 指定请求方法 + imageSyncScanRequest.setMethod(MethodType.POST); // 指定请求方法 imageSyncScanRequest.setEncoding(SysConstant.UTF8); imageSyncScanRequest.setRegionId(regionId); imageSyncScanRequest.setConnectTimeout(3000); From 79f246b03468679c82c8b0262f0b5ea4af61e113 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 4 Jan 2021 10:05:32 +0800 Subject: [PATCH 26/27] =?UTF-8?q?=E9=87=8D=E8=A6=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=9C=BA=E5=99=A8=E4=BA=BA=E6=9B=B4=E5=A5=BD?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/HttpClientManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 8b5a691891..6b98d0f919 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -249,8 +249,8 @@ public class HttpClientManager { */ public Result 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; From 5cf29ece5de1ca855f802cbcfe9bbf1068a75b3c Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 4 Jan 2021 15:18:40 +0800 Subject: [PATCH 27/27] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91oss=20=E7=9A=84=E7=A7=81=E6=9C=89=E5=92=8C=E5=85=AC?= =?UTF-8?q?=E6=9C=89bucket=E8=AE=BF=E9=97=AE=E7=9B=B8=E5=85=B3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/constants/PrivacyType.java | 9 ++ .../cloud/AbstractCloudStorageService.java | 11 +-- .../cloud/AliyunCloudStorageService.java | 49 +++++++---- .../com/epmet/cloud/CloudStorageConfig.java | 86 ++++++++++++++----- .../cloud/FastDFSCloudStorageService.java | 16 ++-- .../epmet/cloud/LocalCloudStorageService.java | 16 ++-- .../cloud/QcloudCloudStorageService.java | 16 ++-- .../epmet/cloud/QiniuCloudStorageService.java | 16 ++-- .../com/epmet/controller/OssController.java | 18 ++-- .../java/com/epmet/service/OssService.java | 4 +- .../epmet/service/impl/OssServiceImpl.java | 10 +-- 11 files changed, 160 insertions(+), 91 deletions(-) create mode 100644 epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/constants/PrivacyType.java diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/constants/PrivacyType.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/constants/PrivacyType.java new file mode 100644 index 0000000000..3564f3ad1c --- /dev/null +++ b/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"; +} diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java index fd4002d57b..bd88d9b50a 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java +++ b/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; } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java index e55449ad0f..3b599a4abd 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java +++ b/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 diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java index 87be3fec93..ce0c102162 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/CloudStorageConfig.java +++ b/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; + } + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java index 9661e5f054..b5493c02b2 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java +++ b/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 { } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java index 71c17580c5..b523283101 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java +++ b/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 { } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java index 22d7da2219..ef7d6fcc07 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java +++ b/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 { } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java index 0fa9ee9f7e..1145234e22 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java +++ b/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 { } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 0f78958d58..aab2f2e575 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/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 uploadImg(@RequestParam("file") MultipartFile file) { - return ossService.uploadImg(file); + return ossService.uploadImg(file, null); } @PostMapping("uploadwximg") public Result uploadWxImg(@RequestPart("media") MultipartFile media) { - return ossService.uploadImg(media); + return ossService.uploadImg(media, null); } @PostMapping("uploadqrcode") public Result 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); } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java index c67fec06f2..f49e421887 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java @@ -28,7 +28,7 @@ public interface OssService extends BaseService { int insertOssEntity(OssEntity ossEntity); - Result uploadImg(MultipartFile file); + Result uploadImg(MultipartFile file, String privacy); - Result extUpload(MultipartFile file, String fileName); + Result extUpload(MultipartFile file, String fileName, String privacy); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index cc44456c7e..b378922706 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/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 implement } @Override - public Result uploadImg(MultipartFile file) { + public Result uploadImg(MultipartFile file, String privacy) { if (file.isEmpty()) { return new Result().error(ModuleErrorCode.UPLOAD_FILE_EMPTY); } @@ -56,7 +56,7 @@ public class OssServiceImpl extends BaseServiceImpl 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 implement } @Override - public Result extUpload(MultipartFile file, String fileName) { + public Result 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 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("图片上传异常");