From 71ba7a523eeb9ec14bbae46a93b51b59da8e72b6 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 12:31:30 +0800 Subject: [PATCH 01/19] =?UTF-8?q?1.=E6=9F=A5=E8=AF=A2=E6=94=BF=E5=BA=9C?= =?UTF-8?q?=E7=AB=AF=E4=BA=BA=E5=91=98=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?sql=E8=B0=83=E6=95=B4=EF=BC=8C=E6=9A=82=E6=97=B6=E5=8E=BB?= =?UTF-8?q?=E6=8E=89org=5Ftype=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/GovStaffRoleDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml index 4cd4ff5b2b..dc00fb859e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml @@ -38,7 +38,7 @@ where DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} - AND ORG_TYPE = 'agency' +-- AND ORG_TYPE = 'agency' ORDER BY SORT ASC From d0d6bd13149d759e3f28cb633270656e9f5d0d52 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 25 May 2020 13:54:17 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-job/epmet-job-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-job/epmet-job-server/pom.xml | 2 +- .../gov-issue/gov-issue-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-issue/gov-issue-server/pom.xml | 2 +- .../gov-project-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-project/gov-project-server/pom.xml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-group/resi-group-server/pom.xml | 2 +- .../resi-home/resi-home-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-home/resi-home-server/pom.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml index 97c609d056..36820f68f4 100644 --- a/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-job-server: container_name: epmet-job-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.2 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.3 ports: - "8084:8084" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index 9af9e3e1b5..920f3f9635 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.2 + 0.3.3 com.epmet epmet-job diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml index 735235df5f..72f753f87e 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.26 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.27 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 57ccdb8f54..01723c912a 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.26 + 0.3.27 gov-issue com.epmet diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml index 2095bc48cb..91a669aae7 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-project-server: container_name: gov-project-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.17 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.18 ports: - "8102:8102" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 1bca572db5..10028b03ff 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.17 + 0.3.18 gov-project com.epmet diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml index e1fbfcdba5..17bfed279e 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.36 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.37 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 550c189c3c..98a4fd290c 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.36 + 0.3.37 com.epmet resi-group diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml index 183083aad6..c1efe4046a 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-home-server: container_name: resi-home-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-home-server:0.3.4 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-home-server:0.3.5 ports: - "8104:8104" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-home/resi-home-server/pom.xml b/epmet-module/resi-home/resi-home-server/pom.xml index 1b30322866..71c700a5d3 100644 --- a/epmet-module/resi-home/resi-home-server/pom.xml +++ b/epmet-module/resi-home/resi-home-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.4 + 0.3.5 resi-home From 602e6e0e27e7bf4e1fa37a9d1523f80eea8c1408 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 15:15:17 +0800 Subject: [PATCH 03/19] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 9 +++ .../epmet/service/impl/AccessServiceImpl.java | 62 ++++++++++++++----- .../epmet/controller/AgencyController.java | 10 ++- .../com/epmet/redis/CustomerAgencyRedis.java | 21 +++++-- .../java/com/epmet/service/AgencyService.java | 2 +- .../epmet/service/impl/AgencyServiceImpl.java | 18 +++++- .../dto/result/GovStaffRoleTemplateDTO.java | 5 ++ .../entity/GovStaffRoleTemplateEntity.java | 5 ++ 8 files changed, 104 insertions(+), 28 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 1f449cf23c..321211465d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -204,4 +204,13 @@ public class RedisKeys { public static String getRoleAllOpeScopesKey(String roleId) { return rootPrefix.concat("gov:access:role:allopescopes:").concat(roleId); } + + /** + * 政府端机关单位缓存Key + * @param agencyId + * @return + */ + public static String getAgencyByIdKey(String agencyId) { + return rootPrefix.concat("gov:agency:").concat(agencyId); + } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java index a56b4740fe..f450240954 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java @@ -7,6 +7,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.GovTokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.OperationScopeConstant; @@ -55,9 +56,13 @@ public class AccessServiceImpl implements AccessService { @Autowired private EpmetUserFeignClient userFeignClient; + @Autowired + private LoginUserUtil loginUserUtil; + public static final String ORG_RELATION_SAME = "same"; public static final String ORG_RELATION_SUB = "sub"; public static final String ORG_RELATION_SUP = "sup"; + public static final String ORG_PATH_SEPARATOR = ":"; /** * 更新权限缓存 @@ -448,28 +453,42 @@ public class AccessServiceImpl implements AccessService { @Override public Set listOperationPermissions(String staffId, String currAgencyId) { - // 1.拿到所属组织机构信息 - Result agencyByStaffRst = govOrgFeignClient.getAgencyByStaff(staffId); - if (!agencyByStaffRst.success()) { - logger.error("根据StaffId查询所属单位出错,StaffId:{}, 错误信息:{}", staffId, agencyByStaffRst.getMsg()); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + GovTokenDto userDetails = getUserDetails(loginUserUtil.getLoginUserApp(), loginUserUtil.getLoginUserClient(), loginUserUtil.getLoginUserId()); + if (userDetails == null) { + throw new RenException(EpmetErrorCode.ERR10006.getCode(), EpmetErrorCode.ERR10006.getMsg()); } - CustomerAgencyDTO belongAgency = agencyByStaffRst.getData(); - if (belongAgency == null) { - logger.error("根据StaffId查询所属单位结果为空,StaffId:{}", staffId); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + + // 1.拿到所属组织机构信息 + String belongAgencyId = getBelongAgencyFromOrgIdPath(userDetails.getOrgIdPath()); + Result belongAgencyRst = govOrgFeignClient.getAgencyById(belongAgencyId); + if (!belongAgencyRst.success()) { + throw new RenException("查询用户的操作权限列表:调用GovOrg,根据belongAgencyId查询机构信息失败:".concat(belongAgencyRst.getInternalMsg())); } + CustomerAgencyDTO belongAgency = belongAgencyRst.getData(); + + //Result agencyByStaffRst = govOrgFeignClient.getAgencyByStaff(staffId); + //if (!agencyByStaffRst.success()) { + // logger.error("根据StaffId查询所属单位出错,StaffId:{}, 错误信息:{}", staffId, agencyByStaffRst.getMsg()); + // throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + //} + //CustomerAgencyDTO belongAgency = agencyByStaffRst.getData(); + //if (belongAgency == null) { + // logger.error("根据StaffId查询所属单位结果为空,StaffId:{}", staffId); + // throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + //} + // 2.拿到当前所处机关单位信息 Result currAgencyRst = govOrgFeignClient.getAgencyById(currAgencyId); CustomerAgencyDTO currAgencyDto = currAgencyRst.getData(); if (!currAgencyRst.success() || currAgencyDto == null) { - logger.error("根据当前机构id[{}]查询pids失败:{}", currAgencyId, currAgencyRst.getMsg()); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + throw new RenException(String.format("根据当前机构id[%s]查询pids失败:%s", currAgencyId, currAgencyRst.getMsg())); } - // 查询机关单位中的角色 - List roleDTOS = queryGovStaffRoles(staffId, belongAgency.getId()); + // 获取机关单位中的角色 + // 目前一个人只在一个单位下,所以不动态查询,如果后面需要一个人在多个单位,再改这里 + //List roleDTOS = queryGovStaffRoles(staffId, belongAgency.getId()); + Set roleIdList = userDetails.getRoleIdList(); // 当前组织和所属组织的orgId路径,以及他们的上下级关系 String belongOrgIdPath = getOrgIdPath(belongAgency); @@ -478,13 +497,26 @@ public class AccessServiceImpl implements AccessService { Set filtedOps = new HashSet<>(); - roleDTOS.forEach(roleDTO -> { - List opeAndScopeDTO = listAllRoleOperationScopesByRoleId(roleDTO.getId()); + roleIdList.forEach(roleId -> { + List opeAndScopeDTO = listAllRoleOperationScopesByRoleId(roleId); filtedOps.addAll(filterOpesByScope(currOrgRelation, opeAndScopeDTO)); }); + return filtedOps; } + /** + * 从OrgIdPath中取所属机构(即最后一截) + * @param orgIdPath + * @return + */ + private String getBelongAgencyFromOrgIdPath(String orgIdPath) { + if (!orgIdPath.contains(ORG_PATH_SEPARATOR)) { + return orgIdPath; + } + return orgIdPath.substring(orgIdPath.lastIndexOf(ORG_PATH_SEPARATOR + 1)); + } + /** * 获取当前所处机关与所属机关的关系 */ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index a5c6f56580..a72f359ee2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -169,13 +169,11 @@ public class AgencyController { */ @PostMapping("agencybyid/{agencyId}") public Result getAgencyById(@PathVariable("agencyId") String agencyId) { - CustomerAgencyEntity agency = agencyService.getAgencyById(agencyId); - CustomerAgencyDTO customerAgencyDTO = new CustomerAgencyDTO(); - if (agency != null) { - BeanUtils.copyProperties(agency, customerAgencyDTO); - return new Result().ok(customerAgencyDTO); + CustomerAgencyDTO agency = agencyService.getAgencyById(agencyId); + if (agency == null) { + agency = new CustomerAgencyDTO(); } - return new Result<>(); + return new Result().ok(agency); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java index 3b8e96c9a2..0c2ed5e9aa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java @@ -17,9 +17,15 @@ package com.epmet.redis; +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.dto.CustomerAgencyDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.Map; /** * 机关单位信息表 @@ -36,12 +42,19 @@ public class CustomerAgencyRedis { } - public void set(){ - + public void set(String agencyId, CustomerAgencyDTO value){ + String key = RedisKeys.getAgencyByIdKey(agencyId); + Map map = BeanUtil.beanToMap(value, false, true); + redisUtils.hMSet(key, map); } - public String get(String id){ - return null; + public CustomerAgencyDTO get(String agencyId){ + String key = RedisKeys.getAgencyByIdKey(agencyId); + Map resultMap = redisUtils.hGetAll(key); + if (CollectionUtils.isEmpty(resultMap)) { + return null; + } + return BeanUtil.mapToBean(resultMap, CustomerAgencyDTO.class, true); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java index a3cf56ec89..2f187a123d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java @@ -88,7 +88,7 @@ public interface AgencyService { * @param agencyId * @return */ - CustomerAgencyEntity getAgencyById(String agencyId); + CustomerAgencyDTO getAgencyById(String agencyId); CustomerAgencyEntity getAgencyByStaff(String staffId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index 1393804624..5df63831c7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -28,11 +28,13 @@ import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.redis.CustomerAgencyRedis; import com.epmet.service.AgencyService; import com.epmet.service.CustomerAgencyService; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -53,6 +55,9 @@ public class AgencyServiceImpl implements AgencyService { @Autowired private CustomerAgencyService customerAgencyService; + @Autowired + private CustomerAgencyRedis customerAgencyRedis; + /** * @param formDTO * @return @@ -241,8 +246,17 @@ public class AgencyServiceImpl implements AgencyService { } @Override - public CustomerAgencyEntity getAgencyById(String agencyId) { - return customerAgencyDao.selectById(agencyId); + public CustomerAgencyDTO getAgencyById(String agencyId) { + CustomerAgencyDTO cachedAgency = customerAgencyRedis.get(agencyId); + if (cachedAgency == null) { + cachedAgency = new CustomerAgencyDTO(); + CustomerAgencyEntity agencyEntity = customerAgencyDao.selectById(agencyId); + if (agencyEntity != null) { + BeanUtils.copyProperties(agencyEntity, cachedAgency); + } + customerAgencyRedis.set(agencyId, cachedAgency); + } + return cachedAgency; } @Override diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java index 5427012aba..fa17be450f 100755 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovStaffRoleTemplateDTO.java @@ -53,6 +53,11 @@ public class GovStaffRoleTemplateDTO implements Serializable { */ private String orgType; + /** + * 是否只有全职 + * */ + private Boolean fullTimeOnly; + /** * */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GovStaffRoleTemplateEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GovStaffRoleTemplateEntity.java index 7e843810dc..34a4844ad9 100755 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GovStaffRoleTemplateEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/GovStaffRoleTemplateEntity.java @@ -53,4 +53,9 @@ public class GovStaffRoleTemplateEntity extends BaseEpmetEntity { */ private String orgType; + /** + * 是否只有全职 + * */ + private Boolean fullTimeOnly; + } From b1ca2ad2dae6e682003bc5e5ea2d667779dbbd95 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 15:20:45 +0800 Subject: [PATCH 04/19] =?UTF-8?q?1.=E9=94=99=E8=AF=AF=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BA=86FeignClient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/GovOrgFeignClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java index d6ab4325af..c9f2e3eada 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping; * @Description * @Author sun */ -//, url = "localhost:8092" +//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class, url = "localhost:8092") @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class) public interface GovOrgFeignClient { From 14526d7da6ea6a7ca494f9eda188ec1310a79c96 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 15:24:16 +0800 Subject: [PATCH 05/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- .../gov-access/gov-access-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-test.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index c308abed16..253991b171 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.14 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.15 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml index ad7d331577..c15d4179bf 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:0.3.14 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:0.3.15 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index 57712195d0..e9a0d4b0d5 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.14 + 0.3.15 gov-access com.epmet diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 2654a1955d..e045250776 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.52 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.53 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml index d92fb192fe..58c63a5e55 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.52 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.53 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 157ff219f3..a46401a8a8 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.52 + 0.3.53 com.epmet gov-org From 0e1cb774d05e40a7d5c5ff849971ff8110c1bd21 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 15:30:54 +0800 Subject: [PATCH 06/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index 253991b171..7434823673 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.15 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.16 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index e9a0d4b0d5..98c5020927 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.15 + 0.3.16 gov-access com.epmet diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index e045250776..ef5c516fbb 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.53 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.54 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index a46401a8a8..48002529fe 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.53 + 0.3.54 com.epmet gov-org diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index b866c80f11..da61c105a0 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.40 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.41 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index cbbdab7b2e..fe1d284fff 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.40 + 0.3.41 com.epmet epmet-user From aff8684510ea1363623918292f0cb5caf8df9ac7 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 17:44:20 +0800 Subject: [PATCH 07/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- .../src/main/java/com/epmet/service/impl/AccessServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index 7434823673..f4fa9fd2a4 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.16 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.17 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index 98c5020927..001e7e00d2 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.16 + 0.3.17 gov-access com.epmet diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java index f450240954..5a11175b94 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java @@ -514,7 +514,7 @@ public class AccessServiceImpl implements AccessService { if (!orgIdPath.contains(ORG_PATH_SEPARATOR)) { return orgIdPath; } - return orgIdPath.substring(orgIdPath.lastIndexOf(ORG_PATH_SEPARATOR + 1)); + return orgIdPath.substring(orgIdPath.lastIndexOf(ORG_PATH_SEPARATOR) + 1); } /** From c57262fa8cf30a8e94e3a68d43e8cec6134102f5 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 18:00:50 +0800 Subject: [PATCH 08/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-test.yml | 2 +- .../gov-issue/gov-issue-server/deploy/docker-compose-test.yml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-test.yml | 2 +- .../gov-project-server/deploy/docker-compose-test.yml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-test.yml | 2 +- .../resi-home/resi-home-server/deploy/docker-compose-test.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-test.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml index c15d4179bf..be5a3a8175 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:0.3.15 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:0.3.17 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml index 4380b18cc4..fe59e9bf5e 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.26 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.27 ports: - "8101:8101" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml index 58c63a5e55..be5cfc3a6e 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.53 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.54 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml index 6c880afdcf..baed6b123b 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-project-server: container_name: gov-project-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-project-server:0.3.17 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-project-server:0.3.18 ports: - "8102:8102" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml index 90a785fe5f..6787fc0226 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.36 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.37 ports: - "8095:8095" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml index 53d4fd2827..96b217592f 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-home-server: container_name: resi-home-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-home-server:0.3.4 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-home-server:0.3.5 ports: - "8104:8104" network_mode: host # 使用现有网络 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index ed7310d3a8..f159bd95a9 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.40 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.41 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From e2be8de0145303e62e2234f5b5ee1bd5733dc59d Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Mon, 25 May 2020 18:00:55 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/IssueController.java | 13 ++ .../src/main/java/com/epmet/dao/IssueDao.java | 8 ++ .../java/com/epmet/service/IssueService.java | 9 ++ .../epmet/service/impl/IssueServiceImpl.java | 11 ++ .../impl/IssueVoteStatisticalServiceImpl.java | 10 +- .../src/main/resources/mapper/IssueDao.xml | 11 ++ .../modules/feign/GovIssueFeignClient.java | 9 ++ .../fallback/GovIssueFeignClientFallBack.java | 6 + .../service/impl/ResiTopicServiceImpl.java | 119 +++++++++--------- .../epmet/modules/utils/ModuleConstant.java | 2 + 10 files changed, 138 insertions(+), 60 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index db84562cb9..bedb47f25c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -13,8 +13,10 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueDTO; import com.epmet.dto.result.*; import com.epmet.excel.IssueExcel; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.service.IssueService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; @@ -138,5 +140,16 @@ public class IssueController { return new Result>().ok(issueService.getNewestIssueList(formDTO)); } + /** + * @Description 校验话题是否已转议题 + * @param formDTO + * @author zxc + */ + @PostMapping(value = "checktopicshiftissue") + public Result checkTopicShiftIssue(@RequestBody TopicInfoFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(issueService.checkTopicShiftIssue(formDTO)); + } + } 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 377c731120..9dee92932c 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 @@ -22,6 +22,7 @@ import com.epmet.dto.IssueDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IssueEntity; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -136,4 +137,11 @@ public interface IssueDao extends BaseDao { * @date 2020.05.22 00:36 **/ Set selectIssueIdsByCondition(IssueDTO issueDTO); + + /** + * @Description 校验话题是否已转议题 + * @param formDTO + * @author zxc + */ + Integer checkTopicShiftIssue(TopicInfoFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 2d2860ce8a..d9f4417ec6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -2,6 +2,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IssueDTO; import com.epmet.dto.form.CloseIssueFormDTO; import com.epmet.dto.form.DepartmentStaffListFormDTO; @@ -20,6 +21,7 @@ import com.epmet.dto.form.IssueDetailFormDTO; import com.epmet.dto.result.*; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.entity.IssueEntity; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; @@ -223,4 +225,11 @@ public interface IssueService extends BaseService { * @date 2020.05.22 00:36 **/ Set getIssueIdsByCondition(IssueDTO issueDTO); + + /** + * @Description 校验话题是否已转议题 + * @param formDTO + * @author zxc + */ + Integer checkTopicShiftIssue(TopicInfoFormDTO formDTO); } 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 b310d78e48..af0693928a 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 @@ -31,6 +31,7 @@ import com.epmet.feign.*; import com.epmet.redis.GovIssueRedis; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.resi.group.dto.topic.result.GovTopicIssueInfoResultDTO; import com.epmet.service.IssueProcessService; import com.epmet.service.IssueProjectRelationService; @@ -706,4 +707,14 @@ public class IssueServiceImpl extends BaseServiceImpl imp return baseDao.selectIssueIdsByCondition(issueDTO); } + /** + * @Description 校验话题是否已转议题 + * @param formDTO + * @author zxc + */ + @Override + public Integer checkTopicShiftIssue(TopicInfoFormDTO formDTO) { + return baseDao.checkTopicShiftIssue(formDTO); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index e7b2475d59..aa229214b7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -168,21 +168,24 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl polyLineDTOS = issueVoteStatisticalDao.polyLineData(issueId); PolyLineDTO polyLineDTO = new PolyLineDTO(); polyLineDTO.setVoteDate(LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8"))); + //议题 已转项目 或 已结案 的时间 + String date = issueDao.operateTime(issueId.getIssueId()); //今天刚转项目或刚刚关闭,当天数据DB没有,直接从缓存拿 - if (polyLineDTOS.size() == NumConstant.ZERO) { + if (polyLineDTOS.size() == NumConstant.ZERO && date.equals(LocalDate.now().toString())) { polyLineDTO.setSupportIncrement(voteRedisFormDTO.getSupportAmount()); polyLineDTO.setOppositionIncrement(voteRedisFormDTO.getOppositionAmount()); polyLineDTOS.add(polyLineDTO); } else { - //折线数据=DB - String date = issueDao.operateTime(issueId.getIssueId()); + //折线数据=DB,今天之前转成的议题,今天 “已转项目”或“已结案” if (date.equals(LocalDate.now().toString())) { Integer yesterdaySupport = 0; Integer yesterdayOppose = 0; @@ -195,6 +198,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/GovIssueFeignClient.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/GovIssueFeignClient.java index d9f7c146b1..1b9622fb8e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/GovIssueFeignClient.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/GovIssueFeignClient.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.modules.feign.fallback.GovIssueFeignClientFallBack; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; @@ -26,4 +27,12 @@ public interface GovIssueFeignClient { **/ @PostMapping(value = "gov/issue/issue/topicshiftissue", consumes = MediaType.APPLICATION_JSON_VALUE) Result issueShiftedToTopic(IssueShiftedFromTopicFormDTO issueShiftedFromTopicFormDTO); + + /** + * @Description 校验话题是否已转议题 + * @param formDTO + * @author zxc + */ + @PostMapping(value = "gov/issue/issue/checktopicshiftissue", consumes = MediaType.APPLICATION_JSON_VALUE) + Result checkTopicShiftIssue(TopicInfoFormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/fallback/GovIssueFeignClientFallBack.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/fallback/GovIssueFeignClientFallBack.java index b3cc109467..d518647f76 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/fallback/GovIssueFeignClientFallBack.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/feign/fallback/GovIssueFeignClientFallBack.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.modules.feign.GovIssueFeignClient; +import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import org.springframework.stereotype.Component; /** @@ -20,4 +21,9 @@ public class GovIssueFeignClientFallBack implements GovIssueFeignClient { public Result issueShiftedToTopic(IssueShiftedFromTopicFormDTO issueShiftedFromTopicFormDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueShiftedToTopic", issueShiftedFromTopicFormDTO); } + + @Override + public Result checkTopicShiftIssue(TopicInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "checkTopicShiftIssue", formDTO); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index d60d161e6b..9c6ecbc007 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -1025,67 +1025,72 @@ public class ResiTopicServiceImpl extends BaseServiceImpl dataFilterResult = - govOrgFeignClient.gridDataFilter(dataFilterParam); - if(dataFilterResult.success() && null != dataFilterResult.getData()){ - IssueShiftedFromTopicFormDTO issueInfo = ConvertUtils.sourceToTarget(topicTurnIssueFromDTO,IssueShiftedFromTopicFormDTO.class); - issueInfo.setCreatedTime(now); - issueInfo.setGridId(group.getGridId()); - issueInfo.setCustomerId(group.getCustomerId()); - issueInfo.setOrgId(dataFilterResult.getData().getAgencyId()); - issueInfo.setOrgIdPath(dataFilterResult.getData().getOrgIdPath()); - issueInfo.setOrgName(dataFilterResult.getData().getOrgName()); - //3.获取小组名称、话题作者、议题发起人 - ResiGroupMemberInfoRedisDTO topicAuthor = resiGroupMemberRedis.get(group.getGroupId(), group.getTopicAuthorId()); - issueInfo.setTopicAuthor(null == topicAuthor ? ModuleConstant.EMPTY_STR : topicAuthor.getUserShowName()); - ResiGroupMemberInfoRedisDTO issueAuthor = resiGroupMemberRedis.get(group.getGroupId(),topicTurnIssueFromDTO.getUserId()); - issueInfo.setIssueAuthor(null == issueAuthor ? ModuleConstant.EMPTY_STR : issueAuthor.getUserShowName()); - ResiGroupInfoRedisDTO groupCache = resiGroupRedis.get(group.getGroupId()); - issueInfo.setGroupName(null == groupCache ? ModuleConstant.EMPTY_STR : groupCache.getGroupName()); - issueInfo.setVotableCount(resiGroupMemberService.gridResiCount(group.getGridId())); - //4.调用gov-issue新增议题 - Result issueResult = govIssueFeignClient.issueShiftedToTopic(issueInfo); - //5.修改话题shiftIssue字段 - if(issueResult.success() && StringUtils.isNotBlank(issueResult.getData())){ - ResiTopicEntity topic2Upd = new ResiTopicEntity(); - topic2Upd.setId(topicTurnIssueFromDTO.getTopicId()); - topic2Upd.setUpdatedBy(topicTurnIssueFromDTO.getUserId()); - topic2Upd.setShiftIssue(Boolean.TRUE); - topic2Upd.setIssueId(issueResult.getData()); - topic2Upd.setUpdatedTime(now); - int topicResult = baseDao.updateOne(topic2Upd); - //6.新增话题操作记录 - if(topicResult == NumConstant.ONE) { - ResiTopicOperationEntity operation = new ResiTopicOperationEntity(); - operation.setCreatedTime(now); - operation.setCreatedBy(topicTurnIssueFromDTO.getUserId()); - operation.setTopicId(topicTurnIssueFromDTO.getTopicId()); - operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE); - int operationResult = resiTopicOperationDao.insertOneByParams(operation); - if(operationResult != NumConstant.ONE){ - logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION); - } - } - //7.更新组统计信息 议题数量+1 - resiGroupStatisticalDao.incryTotalIssues(group.getGroupId()); - if(null != groupCache && null != groupCache.getGroupStatisticalInfo()){ - groupCache.getGroupStatisticalInfo().setTotalIssues( - null == groupCache.getGroupStatisticalInfo().getTotalIssues() ? NumConstant.ONE - : groupCache.getGroupStatisticalInfo().getTotalIssues() + NumConstant.ONE - ); - resiGroupRedis.set(groupCache); + if(null == group) { + throw new RenException(ModuleConstant.FAILURE_TO_TURN_ISSUE); + } + TopicInfoFormDTO topicId = new TopicInfoFormDTO(); + topicId.setTopicId(topicTurnIssueFromDTO.getTopicId()); + Integer issueCount = govIssueFeignClient.checkTopicShiftIssue(topicId).getData(); + if (issueCount != NumConstant.ZERO){ + throw new RenException(ModuleConstant.ALREADY_SHIFT_ISSUE); + } + CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO(); + dataFilterParam.setUserId(topicTurnIssueFromDTO.getUserId()); + dataFilterParam.setGridId(group.getGridId()); + Result dataFilterResult = + govOrgFeignClient.gridDataFilter(dataFilterParam); + if(dataFilterResult.success() && null != dataFilterResult.getData()){ + IssueShiftedFromTopicFormDTO issueInfo = ConvertUtils.sourceToTarget(topicTurnIssueFromDTO,IssueShiftedFromTopicFormDTO.class); + issueInfo.setCreatedTime(now); + issueInfo.setGridId(group.getGridId()); + issueInfo.setCustomerId(group.getCustomerId()); + issueInfo.setOrgId(dataFilterResult.getData().getAgencyId()); + issueInfo.setOrgIdPath(dataFilterResult.getData().getOrgIdPath()); + issueInfo.setOrgName(dataFilterResult.getData().getOrgName()); + //3.获取小组名称、话题作者、议题发起人 + ResiGroupMemberInfoRedisDTO topicAuthor = resiGroupMemberRedis.get(group.getGroupId(), group.getTopicAuthorId()); + issueInfo.setTopicAuthor(null == topicAuthor ? ModuleConstant.EMPTY_STR : topicAuthor.getUserShowName()); + ResiGroupMemberInfoRedisDTO issueAuthor = resiGroupMemberRedis.get(group.getGroupId(),topicTurnIssueFromDTO.getUserId()); + issueInfo.setIssueAuthor(null == issueAuthor ? ModuleConstant.EMPTY_STR : issueAuthor.getUserShowName()); + ResiGroupInfoRedisDTO groupCache = resiGroupRedis.get(group.getGroupId()); + issueInfo.setGroupName(null == groupCache ? ModuleConstant.EMPTY_STR : groupCache.getGroupName()); + issueInfo.setVotableCount(resiGroupMemberService.gridResiCount(group.getGridId())); + //4.调用gov-issue新增议题 + Result issueResult = govIssueFeignClient.issueShiftedToTopic(issueInfo); + //5.修改话题shiftIssue字段 + if(issueResult.success() && StringUtils.isNotBlank(issueResult.getData())){ + ResiTopicEntity topic2Upd = new ResiTopicEntity(); + topic2Upd.setId(topicTurnIssueFromDTO.getTopicId()); + topic2Upd.setUpdatedBy(topicTurnIssueFromDTO.getUserId()); + topic2Upd.setShiftIssue(Boolean.TRUE); + topic2Upd.setIssueId(issueResult.getData()); + topic2Upd.setUpdatedTime(now); + int topicResult = baseDao.updateOne(topic2Upd); + //6.新增话题操作记录 + if(topicResult == NumConstant.ONE) { + ResiTopicOperationEntity operation = new ResiTopicOperationEntity(); + operation.setCreatedTime(now); + operation.setCreatedBy(topicTurnIssueFromDTO.getUserId()); + operation.setTopicId(topicTurnIssueFromDTO.getTopicId()); + operation.setOperationType(ModuleConstant.TOPIC_OPERATION_TYPE_SHIFT_ISSUE); + int operationResult = resiTopicOperationDao.insertOneByParams(operation); + if(operationResult != NumConstant.ONE){ + logger.warn(ModuleConstant.FAILURE_TO_ADD_TOPIC_OPERATION); } - logger.warn(ModuleConstant.FAILURE_TO_UPDATE_TOPIC); - } + //7.更新组统计信息 议题数量+1 + resiGroupStatisticalDao.incryTotalIssues(group.getGroupId()); + if(null != groupCache && null != groupCache.getGroupStatisticalInfo()){ + groupCache.getGroupStatisticalInfo().setTotalIssues( + null == groupCache.getGroupStatisticalInfo().getTotalIssues() ? NumConstant.ONE + : groupCache.getGroupStatisticalInfo().getTotalIssues() + NumConstant.ONE + ); + resiGroupRedis.set(groupCache); + } + logger.warn(ModuleConstant.FAILURE_TO_UPDATE_TOPIC); + } - return; } - throw new RenException(ModuleConstant.FAILURE_TO_TURN_ISSUE); } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java index e152122a75..f077980f7f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/utils/ModuleConstant.java @@ -311,4 +311,6 @@ public interface ModuleConstant extends Constant { * 组状态 审核中 * */ String GROUP_STATUS_UNDER_AUDITTING = "under_auditting"; + + String ALREADY_SHIFT_ISSUE = "话题已转议题,请勿重复操作"; } From 2f96d53b45ce5eac8989b84dc79e07a4bcd6e36d Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Mon, 25 May 2020 18:08:18 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue/gov-issue-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-issue/gov-issue-server/pom.xml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-group/resi-group-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml index 72f753f87e..e87277e8b2 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.27 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.28 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 01723c912a..fdeef9a7d9 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.27 + 0.3.28 gov-issue com.epmet diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml index 17bfed279e..6a7dd51132 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.37 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.38 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 98a4fd290c..c88340e9d9 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.37 + 0.3.38 com.epmet resi-group From b7d7e35e199316254e445f9620add6322c0d416d Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 18:16:14 +0800 Subject: [PATCH 11/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue/gov-issue-server/deploy/docker-compose-test.yml | 2 +- .../resi-group/resi-group-server/deploy/docker-compose-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml index fe59e9bf5e..951098533c 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.27 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.28 ports: - "8101:8101" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml index 6787fc0226..0575a87278 100644 --- a/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-group/resi-group-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-group-server: container_name: resi-group-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.37 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-group-server:0.3.38 ports: - "8095:8095" network_mode: host # 使用现有网络 From 329bb646843c95133b20278f5cce24ec538fc653 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 18:30:42 +0800 Subject: [PATCH 12/19] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8Dmybatis=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81mysql=E6=B3=A8=E9=87=8A=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- .../src/main/resources/mapper/GovStaffRoleDao.xml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index da61c105a0..8f7f0cb065 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.41 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.42 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index fe1d284fff..06587cfbad 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.41 + 0.3.42 com.epmet epmet-user diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml index dc00fb859e..5788da7ba8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GovStaffRoleDao.xml @@ -38,7 +38,6 @@ where DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} --- AND ORG_TYPE = 'agency' ORDER BY SORT ASC From 4763692140af957ff9998fb9a9d37e19d00f0a8a Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 18:32:27 +0800 Subject: [PATCH 13/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index f159bd95a9..5c0188557e 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.41 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.42 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From c868dab6e97f985ff18739f41c1fc7b4961ab873 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 25 May 2020 18:37:12 +0800 Subject: [PATCH 14/19] =?UTF-8?q?1.=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi-mine/resi-mine-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-mine/resi-mine-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml index 75fd0c7d78..fe61151acf 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.16 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.17 ports: - "8094:8094" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 54766af702..4af6cd2d5a 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.16 + 0.3.17 com.epmet resi-mine From e2ca2231a2d9b97fa4d59662e3eff74bb1a2fa64 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 25 May 2020 19:01:19 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=88=91=E7=9A=84=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=9B=A0=E4=B8=BA=E9=99=8C?= =?UTF-8?q?=E7=94=9F=E4=BA=BA=E8=BF=9B=E5=85=A5=E7=BD=91=E6=A0=BC=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E6=B3=A8=E5=86=8C=E5=B1=85=E6=B0=91=EF=BC=8Cregister?= =?UTF-8?q?=5Frelation=E8=A1=A8=E4=B8=AD=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=AD=A4=E6=9D=A1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/UserServiceImpl.java | 8 +++++--- .../main/java/com/epmet/util/ModuleConstant.java | 13 +++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index c23afa09a6..43fec48b74 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -16,15 +16,16 @@ import com.epmet.entity.UserEntity; import com.epmet.entity.UserWechatEntity; import com.epmet.feign.GovOrgFeignClient; import com.epmet.service.UserService; +import com.epmet.util.ModuleConstant; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; + import java.util.Date; -import java.util.List; + /** @@ -153,12 +154,13 @@ public class UserServiceImpl extends BaseServiceImpl implem if(StringUtils.isNotBlank(myselfMsg.getGridId())){ //registerGridName 首次注册的网格 CustomerGridFormDTO gridId = new CustomerGridFormDTO(); - gridId.setGridId(myselfMsg.getGridId()); + gridId.setGridId(myResiUserInfoFormDTO.getGridId()); Result gridResult = govOrgFeignClient.getCustomerGridByGridId(gridId); if(gridResult.success() && null != gridResult.getData()){ result.setRegisterGridName(gridResult.getData().getGridName()); }else{ if(StringUtils.isNotBlank(gridResult.getMsg())) log.warn(gridResult.getMsg()); + result.setRegisterGridName(ModuleConstant.EMPTY_STR); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java new file mode 100644 index 0000000000..4887b0a2f2 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java @@ -0,0 +1,13 @@ +package com.epmet.util; + +/** + * 常量类 + * */ +public interface ModuleConstant { + + /** + * 空字符串 + * */ + String EMPTY_STR = ""; + +} From d8dd52e10711f2b49638055bb09d59f79208af20 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 May 2020 19:13:28 +0800 Subject: [PATCH 16/19] =?UTF-8?q?130=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=EF=BC=9A=E5=B1=85=E6=B0=91=E7=AB=AF=E6=88=91=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=90=8D=E7=A7=B0null=EF=BC=8Cbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 8f7f0cb065..9e060d4558 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.42 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.43 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 06587cfbad..2ab48dbe66 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.42 + 0.3.43 com.epmet epmet-user From 56b33d380411e569ee5ff0a8bb8b3cc9e0609c50 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 May 2020 19:54:56 +0800 Subject: [PATCH 17/19] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E7=AB=AF=E9=A6=96=E9=A1=B5=EF=BC=8C=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=EF=BC=8C=E8=AE=AE=E9=A2=98=E5=8F=91=E8=B5=B7?= =?UTF-8?q?=E4=BA=BA=E5=A4=B4=E5=83=8F=E8=BF=94=E5=8F=82key=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BAuserHeadPhoto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/LatestIssueListResultDTO.java | 2 +- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/LatestIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/LatestIssueListResultDTO.java index 13826f91e2..4a7efdb5ce 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/LatestIssueListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/LatestIssueListResultDTO.java @@ -28,7 +28,7 @@ public class LatestIssueListResultDTO implements Serializable { /** * 用户头像 */ - private String staffHeadPhoto = ""; + private String userHeadPhoto = ""; /** * 议题发起人:XX路-XX先生/女士 * 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 af0693928a..05129fc858 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 @@ -678,7 +678,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp resultDTO.setCreateIssueTime(issue.getCreatedTime().getTime()/1000); userInfoList.forEach(user -> { if (issue.getCreatedBy().equals(user.getUserId())) { - resultDTO.setStaffHeadPhoto(user.getHeadPhoto()); + resultDTO.setUserHeadPhoto(user.getHeadPhoto()); //话题发起人昵称 resultDTO.setIssuePublisherName(user.getShowName()); } From b45388b0bc0baa88491570d5d8d0bd4cc21602bb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 May 2020 20:02:18 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=EF=BC=9Abug=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E7=AB=AF=E9=A6=96=E9=A1=B5=EF=BC=8C=E6=9C=80=E6=96=B0=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E8=AE=AE=E9=A2=98=E5=8F=91=E8=B5=B7=E4=BA=BA?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E8=BF=94=E5=8F=82key=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAuserHeadPhoto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue/gov-issue-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-issue/gov-issue-server/pom.xml | 2 +- .../resi-mine/resi-mine-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-mine/resi-mine-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml index e87277e8b2..1d998c892a 100644 --- a/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-issue-server: container_name: gov-issue-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.28 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.29 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 fdeef9a7d9..7173e28778 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.28 + 0.3.29 gov-issue com.epmet diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml index fe61151acf..05c649a09a 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.17 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.18 ports: - "8094:8094" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 4af6cd2d5a..7b71266622 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.17 + 0.3.18 com.epmet resi-mine From 1bcaa08f90cc76cc95822ad8a1bd18e60be0c486 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 May 2020 20:10:34 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=EF=BC=9Abug=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E7=AB=AF=E9=A6=96=E9=A1=B5=EF=BC=8C=E6=9C=80=E6=96=B0=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E8=AE=AE=E9=A2=98=E5=8F=91=E8=B5=B7=E4=BA=BA?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E8=BF=94=E5=8F=82key=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAuserHeadPhoto=EF=BC=8Cresihome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi-home/resi-home-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/resi-home/resi-home-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml index c1efe4046a..de9207844f 100644 --- a/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml +++ b/epmet-module/resi-home/resi-home-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-home-server: container_name: resi-home-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/resi-home-server:0.3.5 + image: 192.168.1.130:10080/epmet-cloud-dev/resi-home-server:0.3.6 ports: - "8104:8104" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-home/resi-home-server/pom.xml b/epmet-module/resi-home/resi-home-server/pom.xml index 71c700a5d3..75b70f9e09 100644 --- a/epmet-module/resi-home/resi-home-server/pom.xml +++ b/epmet-module/resi-home/resi-home-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.5 + 0.3.6 resi-home