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 62eafbba9c..ff83e56210 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 @@ -250,8 +250,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; 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 41ad7a65f7..08eda7167e 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 @@ -208,6 +208,10 @@ lb://data-aggregator-server + + + lb://epmet-openapi-adv-server + @@ -331,6 +335,10 @@ lb://data-aggregator-server + + + lb://epmet-openapi-adv-server + @@ -425,6 +433,9 @@ lb://epmet-ext-server lb://data-aggregator-server + + + lb://epmet-openapi-adv-server @@ -516,6 +527,9 @@ lb://epmet-ext-server lb://data-aggregator-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 3f9da4089b..28f31cd59b 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -332,6 +332,15 @@ spring: filters: - StripPrefix=1 - CpAuth=true + # 宣传服务 + - id: epmet-openapi-adv-server + uri: @gateway.routes.epmet-openapi-adv-server.url@ + order: 35 + predicates: + - Path=${server.servlet.context-path}/adv/** + filters: + - StripPrefix=1 + - CpAuth=true nacos: discovery: server-addr: @nacos.server-addr@ @@ -447,12 +456,10 @@ epmet: - /gov/project/** - /resi/home/** - /data/report/** - - /data/aggregator/** # 内部认证url白名单(在白名单中的,就不会再校验登录了) internalAuthUrlsWhiteList: - /epmetuser/customerstaff/customerlist - - /resi/group/topic/callBackPublishTopic # 外部应用认证,使用AccessToken等头进行认证 externalOpenUrls: 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..670c9b1d5c 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.81 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..5917c6bda9 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.81 data-statistical com.epmet 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/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-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 2ca72cacc5..32958ebee3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -165,7 +165,9 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } //基层治理- 难点赌点 screen_difficulty_data | screen_difficulty_img_data try { + log.info("【难点赌点数据上报开始------】 当前客户Id{}",param.getCustomerId()); screenGrassrootsGovernDataAbsorptionService.difficultyDataHub(param); + log.info("【难点赌点数据上报结束------】 当前客户Id{}",param.getCustomerId()); }catch (Exception e){ log.error("基层治理-难点赌点抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 2f6f0b6a44..d0ab7c49a8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -185,5 +185,6 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr imgMap.values().forEach(list -> {imgList.addAll(list);}); screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList); + log.info("【大屏数据抽取-难点赌点执行完毕】 客户Id{} 难点赌点数据{}",param.getCustomerId(),JSON.toJSONString(difficulties)); } } 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 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 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 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 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..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 @@ -50,8 +50,9 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { if (ExtConstant.APP_RESI.equals(dto.getApp())){ wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_RESI); } + //2020.12.23 sun 数据库字段key值有work改成gov 外挂接口直接传的gov不用再转换 if (ExtConstant.APP_GOV.equals(dto.getApp())){ - wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_WORK); + wxSubscribeMessageFormDTO.setClientType(ExtConstant.APP_GOV); } wxSubscribeMessageFormDTO.setBehaviorType(dto.getTitle()); wxSubscribeMessageFormDTO.setMessageTime(new Date()); 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 542d4a8281..5993f8ba37 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/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index e98b9d7b88..0caed06020 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("图片上传异常"); diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index 5e56ed023a..60c4577050 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.156 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.157 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 477d9fd22b..ee37509ddc 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.156 + 0.0.157 com.epmet diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index 400d4810ed..74b1f31868 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -122,6 +122,7 @@ third: - https://epmet-cloud.elinkservice.cn - https://epmet-dev.elinkservice.cn - https://epmet-test.elinkservice.cn + - https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com webviewDomain: - https://epmet-ext.elinkservice.cn - https://epmet-ext1.elinkservice.cn 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/deploy/docker-compose-prod.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml index 1447f142c2..bade332658 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-grid-server: container_name: gov-grid-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-grid-server:0.3.39 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-grid-server:0.3.40 ports: - "8097:8097" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index 6e0f257174..57bbc5fb73 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 0.3.39 + 0.3.40 com.epmet gov-grid 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/deploy/docker-compose-prod.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml index 18bc535f46..802b7df8c9 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.58 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-issue-server:0.3.60 ports: - "8101:8101" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index 56cb2ab666..68e7b17d5b 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.58 + 0.3.60 gov-issue com.epmet 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 2fb277c4ec..3680e0cbfd 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..4c2878e0e5 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 @@ -242,7 +242,7 @@ ID AS issueId, IFNULL(ISSUE_TITLE,'') AS issueTitle, IFNULL(CLOSE_REASON,'') AS closeReason, - UNIX_TIMESTAMP( created_time ) AS closedTime + UNIX_TIMESTAMP( closed_time ) AS closedTime FROM issue WHERE @@ -513,4 +513,48 @@ ORDER BY CREATED_TIME DESC + + \ No newline at end of file diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml index d728d97e7e..2bb561026b 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.35 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.36 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 70e7ecfc1c..26a057cce8 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.35 + 0.3.36 com.epmet gov-mine 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/deploy/docker-compose-prod.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml index 053f95b4b8..8b618d43e3 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.81 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-group-server:0.3.82 ports: - "8095:8095" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index a2003e0dd8..7f86290566 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.81 + 0.3.82 com.epmet resi-group 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/deploy/docker-compose-prod.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml index bad8fd163c..ce9ba1ebaa 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-partymember-server: container_name: resi-partymember-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.61 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.62 ports: - "8096:8096" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index c239476922..9e7c958a90 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.61 + 0.3.62 com.epmet resi-partymember 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 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 new file mode 100644 index 0000000000..5c57808384 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-client/pom.xml @@ -0,0 +1,16 @@ + + + + epmet-openapi-adv + com.epmet + 2.0.0 + ../pom.xml + + 4.0.0 + + epmet-openapi-adv-client + + + \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/Dockerfile b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/Dockerfile new file mode 100644 index 0000000000..d15b865820 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/Dockerfile @@ -0,0 +1,11 @@ +FROM java:8 + +RUN export LANG="zh_CN.UTF-8" +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN echo 'Asia/Shanghai' > /etc/timezone + +COPY ./target/*.jar ./epmet-openapi-adv.jar + +EXPOSE 8115 + +ENTRYPOINT ["sh", "-c", "exec $RUN_INSTRUCT"] \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-dev.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-dev.yml new file mode 100644 index 0000000000..55c505363d --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-dev.yml @@ -0,0 +1,18 @@ +version: "3.7" +services: + epmet-openapi-adv-server: + container_name: epmet-openapi-adv-server-dev + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-openapi-adv-server:version_placeholder + ports: + - "8015:8015" + network_mode: host # 不会创建新的网络 + volumes: + - "/opt/epmet-cloud-logs/dev:/logs" + environment: + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-adv.jar" + restart: "unless-stopped" + deploy: + resources: + limits: + cpus: '0.1' + memory: 300M \ No newline at end of file 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 new file mode 100644 index 0000000000..b5a13e04e3 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-prod.yml @@ -0,0 +1,18 @@ +version: "3.7" +services: + epmet-openapi-adv-server: + container_name: epmet-openapi-adv-server-prod + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-openapi-adv-server:0.3.3 + ports: + - "8015:8015" + network_mode: host # 不会创建新的网络 + volumes: + - "/opt/epmet-cloud-logs/prod:/logs" + environment: + RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-openapi-adv.jar" + restart: "unless-stopped" + deploy: + resources: + limits: + cpus: '0.1' + memory: 600M \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-test.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-test.yml new file mode 100644 index 0000000000..45d536cb2f --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/deploy/docker-compose-test.yml @@ -0,0 +1,18 @@ +version: "3.7" +services: + epmet-openapi-adv-server: + container_name: epmet-openapi-adv-server-test + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-openapi-adv-server:version_placeholder + ports: + - "8015:8015" + network_mode: host # 不会创建新的网络 + volumes: + - "/opt/epmet-cloud-logs/test:/logs" + environment: + RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-openapi-adv.jar" + restart: "unless-stopped" + deploy: + resources: + limits: + cpus: '0.1' + memory: 300M \ No newline at end of file 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 new file mode 100644 index 0000000000..8dd1602e70 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/pom.xml @@ -0,0 +1,227 @@ + + + + 0.3.3 + + epmet-openapi-adv + com.epmet + 2.0.0 + ../pom.xml + + 4.0.0 + + epmet-openapi-adv-server + + + + com.epmet + epmet-commons-mybatis + 2.0.0 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework + spring-context-support + + + org.springframework.boot + spring-boot-starter-actuator + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + io.github.openfeign + feign-httpclient + 10.3.0 + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + ${project.basedir}/src/main/java + + + true + ${basedir}/src/main/resources + + + + + + + dev + + 8115 + dev + + + + + + epmet_adv_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + + local + + true + + + 8115 + local + + + + + + epmet_adv_user + EpmEt-db-UsEr + + 0 + 118.190.150.119 + 47379 + 123456 + + false + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + test + + + 8115 + test + + + + + + epmet + elink@833066 + + 0 + r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com + 6379 + EpmEtrEdIs!q@w + + true + 192.168.10.150:8848 + 67e3c350-533e-4d7c-9f8f-faf1b4aa82ae + + + false + + + true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + + prod + + 8115 + prod + + + + + + epmet_adv_user + EpmEt-db-UsEr + + 0 + r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com + 6379 + EpmEtclOUdrEdIs!Q2w + + true + 192.168.11.180:8848 + bd205d23-e696-47be-b995-916313f86e99 + + + false + + + true + + + + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c + + SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1 + + + + + + \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/AdvApplication.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/AdvApplication.java new file mode 100644 index 0000000000..61c5d3b4b8 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/AdvApplication.java @@ -0,0 +1,15 @@ +package com.epmet; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +@SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +public class AdvApplication { + public static void main(String[] args) { + SpringApplication.run(AdvApplication.class, args); + } +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/aspect/RequestLogAspect.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/aspect/RequestLogAspect.java new file mode 100644 index 0000000000..e06fdc2c95 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/aspect/RequestLogAspect.java @@ -0,0 +1,40 @@ +package com.epmet.adv.aspect; + +import com.epmet.commons.tools.aspect.BaseRequestLogAspect; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; + +/** + * 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。 + */ +@Aspect +@Component +@Order(0) +public class RequestLogAspect extends BaseRequestLogAspect { + + @Override + @Around(value = "execution(* com.epmet.adv.controller.*Controller*.*(..)) ") + public Object proceed(ProceedingJoinPoint point) throws Throwable { + return super.proceed(point, getRequest()); + } + + /** + * 获取Request对象 + * + * @return + */ + private HttpServletRequest getRequest() { + RequestAttributes ra = RequestContextHolder.getRequestAttributes(); + ServletRequestAttributes sra = (ServletRequestAttributes) ra; + return sra.getRequest(); + } + +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/config/ModuleConfigImpl.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/config/ModuleConfigImpl.java new file mode 100644 index 0000000000..8d88549b66 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/config/ModuleConfigImpl.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.adv.config; + +import com.epmet.commons.tools.config.ModuleConfig; +import org.springframework.stereotype.Service; + +/** + * 模块配置信息 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Service +public class ModuleConfigImpl implements ModuleConfig { + @Override + public String getName() { + return "adv"; + } +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java new file mode 100644 index 0000000000..5c032ad562 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/controller/AdvVideoController.java @@ -0,0 +1,28 @@ +package com.epmet.adv.controller; + +import com.epmet.adv.entity.AdvVedioEntity; +import com.epmet.adv.service.AdvVedioService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.io.IOException; + +@Controller +@RequestMapping("video") +public class AdvVideoController { + + @Autowired + private AdvVedioService advVedioService; + + @GetMapping("company-adv") + public String toVedio() throws IOException { + AdvVedioEntity enableAdvVedioEntity = advVedioService.getEnableAdvVedioEntity(); + String redirectUrl = enableAdvVedioEntity != null ? enableAdvVedioEntity.getPath() : "404"; + return String.format("redirect:%s", redirectUrl); + //response.sendRedirect("www.baidu.com"); + } + +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java new file mode 100644 index 0000000000..c14da09d52 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/dao/AdvVedioDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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.adv.dao; + +import com.epmet.adv.entity.AdvVedioEntity; +import com.epmet.commons.mybatis.dao.BaseDao; +import org.apache.ibatis.annotations.Mapper; + +/** + * 宣传视频 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-30 + */ +@Mapper +public interface AdvVedioDao extends BaseDao { + AdvVedioEntity getEnableAdvVedioEntity(); +} \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/entity/AdvVedioEntity.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/entity/AdvVedioEntity.java new file mode 100644 index 0000000000..a25c6ea77e --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/entity/AdvVedioEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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.adv.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 宣传视频 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("adv_vedio") +public class AdvVedioEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 存储路径 + */ + private String path; + + /** + * 存储类型。aliyun_oss,local + */ + private String storeType; + + /** + * 是否启用 + */ + private Integer enable; + +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/AdvVedioService.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/AdvVedioService.java new file mode 100644 index 0000000000..38091ee496 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/AdvVedioService.java @@ -0,0 +1,7 @@ +package com.epmet.adv.service; + +import com.epmet.adv.entity.AdvVedioEntity; + +public interface AdvVedioService { + AdvVedioEntity getEnableAdvVedioEntity(); +} diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/impl/AdvVedioServiceImpl.java b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/impl/AdvVedioServiceImpl.java new file mode 100644 index 0000000000..cecc710c39 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/java/com/epmet/adv/service/impl/AdvVedioServiceImpl.java @@ -0,0 +1,18 @@ +package com.epmet.adv.service.impl; + +import com.epmet.adv.dao.AdvVedioDao; +import com.epmet.adv.entity.AdvVedioEntity; +import com.epmet.adv.service.AdvVedioService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AdvVedioServiceImpl implements AdvVedioService { + @Autowired + private AdvVedioDao advVedioDao; + + public AdvVedioEntity getEnableAdvVedioEntity() { + return advVedioDao.getEnableAdvVedioEntity(); + } + +} 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 new file mode 100644 index 0000000000..247b417689 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml @@ -0,0 +1,139 @@ +server: + port: @server.port@ + servlet: + context-path: /adv + +spring: + main: + allow-bean-definition-overriding: true + application: + name: epmet-openapi-adv-server + #环境 dev|test|prod + profiles: + active: @spring.profiles.active@ + messages: + encoding: UTF-8 + basename: i18n/messages_common + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + redis: + database: @spring.redis.index@ + host: @spring.redis.host@ + port: @spring.redis.port@ + password: @spring.redis.password@ + timeout: 30s + datasource: + druid: + #MySQL + driver-class-name: com.mysql.cj.jdbc.Driver + url: @spring.datasource.druid.url@ + username: @spring.datasource.druid.username@ + password: @spring.datasource.druid.password@ + initial-size: 10 + max-active: 100 + min-idle: 10 + max-wait: 60000 + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 20 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + #Oracle需要打开注释 + #validation-query: SELECT 1 FROM DUAL + test-while-idle: true + test-on-borrow: false + test-on-return: false + filter: + stat: + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: false + wall: + config: + multi-statement-allow: true + # 数据迁移工具flyway + flyway: + enabled: @spring.flyway.enabled@ + locations: classpath:db/migration + url: @spring.datasource.druid.url@ + user: @spring.datasource.druid.username@ + password: @spring.datasource.druid.password@ + baseline-on-migrate: true + baseline-version: 0 + cloud: + nacos: + discovery: + server-addr: @nacos.server-addr@ + #nacos的命名空间ID,默认是public + namespace: @nacos.discovery.namespace@ + #不把自己注册到注册中心的地址 + register-enabled: @nacos.register-enabled@ + ip: @nacos.ip@ + config: + enabled: @nacos.config-enabled@ + server-addr: @nacos.server-addr@ + namespace: @nacos.config.namespace@ + group: @nacos.config.group@ + file-extension: yaml +management: + endpoints: + web: + exposure: + include: "*" + endpoint: + health: + show-details: ALWAYS + +mybatis-plus: + mapper-locations: classpath:/mapper/**/*.xml + #实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: com.epmet.entity + global-config: + #数据库相关配置 + db-config: + #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; + id-type: ID_WORKER + #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" + field-strategy: NOT_NULL + #驼峰下划线转换 + column-underline: true + banner: false + #原生配置 + configuration: + map-underscore-to-camel-case: true + cache-enabled: false + call-setters-on-nulls: true + jdbc-type-for-null: 'null' + +feign: + hystrix: + enabled: true + client: + config: + default: + loggerLevel: BASIC + httpclient: + enabled: true + + +hystrix: + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 60000 #缺省为1000 + +ribbon: + ReadTimeout: 300000 + ConnectTimeout: 300000 + +#pageHelper分页插件 +pagehelper: + helper-dialect: mysql + reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 + +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/db/migration/V0.0.1__createAdvVedio.sql b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/db/migration/V0.0.1__createAdvVedio.sql new file mode 100644 index 0000000000..007c12b55f --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/db/migration/V0.0.1__createAdvVedio.sql @@ -0,0 +1,18 @@ +-- create database epmet_adv default character set utf8mb4; + +-- CREATE USER epmet_adv_user@'%' IDENTIFIED BY 'EpmEt-db-UsEr'; +-- GRANT ALL ON `epmet_adv%`.* TO 'epmet_adv_user'@'%'; +-- flush privileges; + +CREATE TABLE `adv_vedio` ( + `ID` varchar(64) NOT NULL COMMENT 'id' primary key , + `PATH` varchar(255) NOT NULL COMMENT '存储路径', + `STORE_TYPE` varchar(30) NOT NULL COMMENT '存储类型。aliyun_oss,local', + `ENABLE` tinyint(1) NOT NULL COMMENT '是否启用', + `REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', + `DEL_FLAG` int(11) unsigned DEFAULT NULL COMMENT '删除标识 0:未删除 1:删除', + `CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建者', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新者', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='宣传视频' \ No newline at end of file diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/logback-spring.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..06a21d317c --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/logback-spring.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + ${appname} + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + ${log.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + ${webHook} + ${secret} + ${appname} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/mapper/AdvVedioDao.xml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/mapper/AdvVedioDao.xml new file mode 100644 index 0000000000..92a4993b9f --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/mapper/AdvVedioDao.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + \ 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..13490687d1 --- /dev/null +++ b/epmet-openapi/epmet-openapi-adv/pom.xml @@ -0,0 +1,21 @@ + + + + epmet-openapi + 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/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 6bd9caf156..b95091abcc 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 @@ -12,6 +12,7 @@ import com.aliyuncs.http.FormatType; import com.aliyuncs.http.HttpResponse; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; +import com.aliyuncs.http.MethodType; import com.epmet.commons.tools.utils.Result; import com.epmet.openapi.scan.common.constant.SysConstant; import com.epmet.openapi.scan.common.enu.*; diff --git a/epmet-openapi/pom.xml b/epmet-openapi/pom.xml index 9db62073f3..fd15705343 100644 --- a/epmet-openapi/pom.xml +++ b/epmet-openapi/pom.xml @@ -13,6 +13,7 @@ epmet-openapi epmet-openapi-scan + epmet-openapi-adv \ No newline at end of file