diff --git a/epmet-auth/deploy/docker-compose-dev.yml b/epmet-auth/deploy/docker-compose-dev.yml index 17251744b4..c09782692c 100644 --- a/epmet-auth/deploy/docker-compose-dev.yml +++ b/epmet-auth/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.11 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.12 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/deploy/docker-compose-test.yml b/epmet-auth/deploy/docker-compose-test.yml index fc62897cb3..7d50f4b735 100644 --- a/epmet-auth/deploy/docker-compose-test.yml +++ b/epmet-auth/deploy/docker-compose-test.yml @@ -2,16 +2,16 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.11 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.12 ports: - "8081:8081" network_mode: host # 使用现有网络 volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 400M \ No newline at end of file diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 6419876640..036aeea2f0 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.11 + 0.3.12 com.epmet epmet-cloud diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/feign/GovAccessFeignClient.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/feign/GovAccessFeignClient.java index 3492e75587..b30419dd56 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/feign/GovAccessFeignClient.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/feign/GovAccessFeignClient.java @@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; -//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovAccessFeignClientFallBack.class) -@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovAccessFeignClientFallBack.class, url = "localhost:8099") +@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallBack.class) public interface GovAccessFeignClient { /** 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 ba0658398f..c308abed16 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.13 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.14 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 3c42ac538e..ad7d331577 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,16 +2,16 @@ 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.13 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:0.3.14 ports: - "8099:8099" network_mode: host # 使用现有网络 volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 400M \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index 8bdca567b0..57712195d0 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.13 + 0.3.14 gov-access com.epmet diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/constant/OperationScopeConstant.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/constant/OperationScopeConstant.java index 02dd6664ff..f4aba15fbc 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/constant/OperationScopeConstant.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/constant/OperationScopeConstant.java @@ -39,6 +39,11 @@ public class OperationScopeConstant { //"本组织" public static final String SCOPE_ORG_CURR = "org_curr"; + //"本组织的上级" + public static final String SCOPE_ORG_CURR_SUP = "org_curr_sup"; + //"本组织及上级" + public static final String SCOPE_ORG_CURR_AND_SUP = "org_curr_and_sup"; + //我创建的 public static final String SCOPE_I_CREATED = "i_created"; //网格内 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 b5ec4bd689..a56b4740fe 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 @@ -3,7 +3,6 @@ package com.epmet.service.impl; import cn.hutool.core.collection.CollectionUtil; import com.epmet.bean.OpeScopeFilterResultBean; import com.epmet.commons.tools.constant.AppClientConstant; -import com.epmet.commons.tools.constant.OpeScopeConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; @@ -175,7 +174,7 @@ public class AccessServiceImpl implements AccessService { Set switchScopes = effectiveOpeScopes.getSwitchScopes(); // 生成组织上下级关系系列的sql过滤片段 - if (!CollectionUtil.isEmpty(orgLevelScopes) && !orgLevelScopes.contains(OpeScopeConstant.ORG_ALL)) { + if (!CollectionUtil.isEmpty(orgLevelScopes) && !orgLevelScopes.contains(OperationScopeConstant.SCOPE_ORG_ALL)) { genOrgLevelScopeSqlFilter(sb, orgLevelScopes, userDetails.getOrgIdPath(), form.getTableAlias()); } @@ -316,7 +315,7 @@ public class AccessServiceImpl implements AccessService { for (RoleOpeScopeResultDTO scope : scopeDTOS) { - if (OpeScopeConstant.ALL.equals(scope.getScopeKey())) { + if (OperationScopeConstant.SCOPE_ALL.equals(scope.getScopeKey())) { all = true; break; } @@ -327,7 +326,7 @@ public class AccessServiceImpl implements AccessService { } String scopeIndex = scope.getScopeIndex(); - if (OpeScopeConstant.ORG_ALL.equals(scope.getScopeKey())) { + if (OperationScopeConstant.SCOPE_ORG_ALL.equals(scope.getScopeKey())) { // 该操作具有org_all的权限,直接放入 orgLevelScopes.put(scopeIndex, scope); continue; @@ -378,7 +377,7 @@ public class AccessServiceImpl implements AccessService { for (String scope : scopes) { switch (scope) { // 当前单位(可以用ORG_ID_PATH,也可以用ORG_ID判断) - case OpeScopeConstant.ORG_CURR: + case OperationScopeConstant.SCOPE_ORG_CURR: if (StringUtils.isBlank(tableAlias)) { sb.append(" ORG_ID_PATH = '").append(orgIdPath).append("' OR "); //sb.append(" ORG_ID = '").append(currOrgID).append("' OR "); @@ -388,7 +387,7 @@ public class AccessServiceImpl implements AccessService { } break; // 本单位及其子级单位 - case OpeScopeConstant.ORG_CURR_AND_SUB: + case OperationScopeConstant.SCOPE_ORG_CURR_AND_SUB: if (StringUtils.isBlank(tableAlias)) { sb.append(" ORG_ID_PATH like '").append(orgIdPath).append("%' OR "); } else { @@ -396,7 +395,7 @@ public class AccessServiceImpl implements AccessService { } break; // 本单位的子级单位 - case OpeScopeConstant.ORG_CURR_SUB: + case OperationScopeConstant.SCOPE_ORG_CURR_SUB: if (StringUtils.isBlank(tableAlias)) { sb.append(" ORG_ID_PATH like '").append(orgIdPath).append(":%' OR "); } else { @@ -404,7 +403,7 @@ public class AccessServiceImpl implements AccessService { } break; //当前单位的父级单位 - case OpeScopeConstant.ORG_CURR_SUP: + case OperationScopeConstant.SCOPE_ORG_CURR_SUP: if (StringUtils.isBlank(tableAlias)) { sb.append(" '").append(orgIdPath).append("' like CONCAT(").append("ORG_ID_PATH,':%') OR "); } else { @@ -412,30 +411,30 @@ public class AccessServiceImpl implements AccessService { } break; // 当前单位及其父级单位 - case OpeScopeConstant.ORG_CURR_AND_SUP: + case OperationScopeConstant.SCOPE_ORG_CURR_AND_SUP: if (StringUtils.isBlank(tableAlias)) { sb.append(" '").append(orgIdPath).append("' like CONCAT(").append("ORG_ID_PATH,'%') OR "); } else { sb.append(" '").append(orgIdPath).append("' like CONCAT(").append(tableAlias).append(".ORG_ID_PATH,'%' ) OR "); } break; - case OpeScopeConstant.ORG_EQUAL: + case OperationScopeConstant.SCOPE_ORG_EQUAL: // todo 同级 //sb.append(" OR "); break; - case OpeScopeConstant.ORG_EQUAL_AND_SUB: + case OperationScopeConstant.SCOPE_ORG_EQUAL_AND_SUB: // todo 同级及其子级 //sb.append(" OR "); break; - case OpeScopeConstant.ORG_EQUAL_SUB: + case OperationScopeConstant.SCOPE_ORG_EQUAL_SUB: // todo 同级的子级 //sb.append(" OR "); break; - case OpeScopeConstant.ORG_EQUAL_AND_SUP: + case OperationScopeConstant.SCOPE_ORG_EQUAL_AND_SUP: // todo 同级及其上级 //sb.append(" OR "); break; - case OpeScopeConstant.ORG_EQUAL_SUP: + case OperationScopeConstant.SCOPE_ORG_EQUAL_SUP: // todo 同级的上级 //sb.append(" OR "); break; @@ -539,7 +538,7 @@ public class AccessServiceImpl implements AccessService { HashSet opeKeys = new HashSet<>(); for (RoleOpeScopeResultDTO opeScope : roleOperations) { String scopeKey = opeScope.getScopeKey(); - if (OpeScopeConstant.ORG_ALL.equals(scopeKey) || OpeScopeConstant.ALL.equals(scopeKey)) { + if (OperationScopeConstant.SCOPE_ORG_ALL.equals(scopeKey) || OperationScopeConstant.SCOPE_ALL.equals(scopeKey)) { // 如果该操作的范围是org_all或者all,不需要根据上下级关系判断,直接返回即可。 opeKeys.add(opeScope.getOperationKey()); continue; @@ -553,21 +552,21 @@ public class AccessServiceImpl implements AccessService { switch (currOrgRelation) { case ORG_RELATION_SAME:// 就在所在机构下 - if (OpeScopeConstant.ORG_CURR.equals(scopeKey) - || OpeScopeConstant.ORG_CURR_AND_SUB.equals(scopeKey) - || OpeScopeConstant.ORG_CURR_AND_SUP.equals(scopeKey)) { + if (OperationScopeConstant.SCOPE_ORG_CURR.equals(scopeKey) + || OperationScopeConstant.SCOPE_ORG_CURR_AND_SUB.equals(scopeKey) + || OperationScopeConstant.SCOPE_ORG_CURR_AND_SUP.equals(scopeKey)) { opeKeys.add(opeScope.getOperationKey()); } break; case ORG_RELATION_SUB:// 所在机构的子级 - if (OpeScopeConstant.ORG_CURR_SUB.equals(scopeKey) - || OpeScopeConstant.ORG_CURR_AND_SUB.equals(scopeKey)) { + if (OperationScopeConstant.SCOPE_ORG_CURR_SUB.equals(scopeKey) + || OperationScopeConstant.SCOPE_ORG_CURR_AND_SUB.equals(scopeKey)) { opeKeys.add(opeScope.getOperationKey()); } break; case ORG_RELATION_SUP:// 所在机构的上级 - if (OpeScopeConstant.ORG_CURR_SUP.equals(scopeKey) - || OpeScopeConstant.ORG_CURR_AND_SUP.equals(scopeKey)) { + if (OperationScopeConstant.SCOPE_ORG_CURR_SUP.equals(scopeKey) + || OperationScopeConstant.SCOPE_ORG_CURR_AND_SUP.equals(scopeKey)) { opeKeys.add(opeScope.getOperationKey()); } break; diff --git a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml index 038e0b700c..d3aad3f4c4 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-grid-server: container_name: gov-grid-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-grid-server:0.3.22 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-grid-server:0.3.23 ports: - "8097:8097" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml index d7acafa8de..552bf1a18e 100644 --- a/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-grid/gov-grid-server/deploy/docker-compose-test.yml @@ -2,16 +2,16 @@ version: "3.7" services: gov-grid-server: container_name: gov-grid-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-grid-server:0.3.22 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-grid-server:0.3.23 ports: - "8097:8097" network_mode: host # 使用现有网络 volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 300M \ No newline at end of file + memory: 400M \ No newline at end of file diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index fb1a970dc9..cf2ba0e960 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.22 + 0.3.23 com.epmet gov-grid 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 1c4fe33e19..13826f91e2 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 @@ -21,16 +21,21 @@ public class LatestIssueListResultDTO implements Serializable { * 议题标题 */ private String issueTitle = ""; - /** - * 议题发起人:XX路-XX先生 - */ - private String issuePublisherName = ""; /** * 话题内容 */ private String topicContent = ""; /** - * 表达态度总人数 + * 用户头像 + */ + private String staffHeadPhoto = ""; + /** + * 议题发起人:XX路-XX先生/女士 + * + */ + private String issuePublisherName = ""; + /** + * 议题创建时间 */ - private Integer votedCount = 0; + private Long createIssueTime; } 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 b07e89d2fa..735235df5f 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.25 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.26 ports: - "8101:8101" 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 5f836b9b3d..4380b18cc4 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,16 +2,16 @@ 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.25 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-issue-server:0.3.26 ports: - "8101:8101" network_mode: host # 使用现有网络 volumes: - "/opt/epmet-cloud-logs/test:/logs" environment: - RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" + RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar" deploy: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 400M \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index e3e016c40b..57ccdb8f54 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.25 + 0.3.26 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 8fc76e1b85..377c731120 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 @@ -20,10 +20,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.ClosedIssueListGovResultDTO; -import com.epmet.dto.result.ClosedIssueListResultDTO; -import com.epmet.dto.result.IssueResultDTO; -import com.epmet.dto.result.VotingIssueListResultDTO; import com.epmet.dto.result.*; import com.epmet.entity.IssueEntity; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java index 949d0c14fa..134ec32bb1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteStatisticalDao.java @@ -68,13 +68,6 @@ public interface IssueVoteStatisticalDao extends BaseDao polyLineData(IssueIdFormDTO issueId); - /** - * @param issueIdList - * @return - * @Author sun - * @Description 根据议题Id查询议题投票情况 - **/ - List selectListByissueId(@Param("issueIdList") List issueIdList); /** * @Description 得到表决中的议题 来进行缓存与数据库的同步 * @param diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java index 3692ef87b8..74a93deb8b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java @@ -40,6 +40,8 @@ import org.springframework.stereotype.Component; import java.lang.reflect.Field; import java.util.Map; +import static com.epmet.commons.tools.redis.RedisUtils.NOT_EXPIRE; + /** * 议题表决记录表 * @@ -75,7 +77,7 @@ public class IssueVoteDetailRedis { String key = IssueConstant.REDIS_KEY +vote.getIssueId(); //bean to map Map map = BeanUtil.beanToMap(vote, false, true); - redisUtils.hMSet(key, map); + redisUtils.hMSet(key, map,NOT_EXPIRE); } public VoteRedisFormDTO get(String issueId){ 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 632017e990..b310d78e48 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 @@ -605,22 +605,24 @@ public class IssueServiceImpl extends BaseServiceImpl imp } //1:根据已结案项目列表查询议题项目关系表数据 List listRelation = issueProjectRelationDao.selectRelationList(projectIdList); - if(null==listRelation||listRelation.size() issueIdList = listRelation.stream().map(IssueProjectRelationEntity::getIssueId).collect(Collectors.toList()); //2:根据查询条件筛选出客户网格下已结案项目对应的议题详情列表 LatestListFormDTO latestListForm = formDTO.getLatestListForm(); - latestListForm.setPageNo((latestListForm.getPageNo()-NumConstant.ONE)*latestListForm.getPageSize()); + latestListForm.setPageNo((latestListForm.getPageNo() - NumConstant.ONE) * latestListForm.getPageSize()); List entityList = baseDao.selectIssueList(issueIdList, latestListForm); - + if (null == entityList || entityList.size() < NumConstant.ONE) { + throw new RenException(IssueConstant.SELECT_EXCEPTION); + } //3:遍历封装数据 - entityList.forEach(issue->{ - listRelation.forEach(relation->{ - if(relation.getIssueId().equals(issue.getId())){ - formDTO.getLatestListResult().forEach(project->{ - if(relation.getProjectId().equals(project.getProjectId())){ + entityList.forEach(issue -> { + listRelation.forEach(relation -> { + if (relation.getIssueId().equals(issue.getId())) { + formDTO.getLatestListResult().forEach(project -> { + if (relation.getProjectId().equals(project.getProjectId())) { LatestListResultDTO latest = ConvertUtils.sourceToTarget(project, LatestListResultDTO.class); latest.setIssueId(issue.getId()); latest.setIssueTitle(issue.getIssueTitle()); @@ -649,11 +651,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp return returnList; } - //2:根据议题Id查询议题投票情况 - List issueIdList = entityList.stream().map(IssueEntity::getId).collect(Collectors.toList()); - List StatisticalList = issueVoteStatisticalDao.selectListByissueId(issueIdList); - - //3:调用epmet-user服务,查询议题发起人基本信息 + //2:调用epmet-user服务,查询议题发起人基本信息 List userIdList = entityList.stream().map(IssueEntity::getCreatedBy).collect(Collectors.toList()); UserResiInfoListFormDTO userResiInfoListFormDTO = new UserResiInfoListFormDTO(); userResiInfoListFormDTO.setUserIdList(userIdList); @@ -663,7 +661,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp } List userInfoList = listResult.getData(); - //4:调用resi-group服务,批量查询话题内容 + //3:调用resi-group服务,批量查询话题内容 List topicIdList = entityList.stream().map(IssueEntity::getSourceId).collect(Collectors.toList()); Result> resultTopicList = resiGroupFeignClient.getTopicList(topicIdList); if (!resultTopicList.success() || null == resultTopicList.getData()) { @@ -671,19 +669,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp } List topicList = resultTopicList.getData(); - //5:遍历组装对象 + //4:遍历组装对象 entityList.forEach(issue -> { LatestIssueListResultDTO resultDTO = new LatestIssueListResultDTO(); resultDTO.setIssueId(issue.getId()); resultDTO.setIssueTitle(issue.getIssueTitle()); - StatisticalList.forEach(sta -> { - if (issue.getId().equals(sta.getIssueId())) { - //表达态度总人数 - resultDTO.setVotedCount(sta.getSupportCount() + sta.getOppositionCount()); - } - }); + resultDTO.setCreateIssueTime(issue.getCreatedTime().getTime()/1000); userInfoList.forEach(user -> { if (issue.getCreatedBy().equals(user.getUserId())) { + resultDTO.setStaffHeadPhoto(user.getHeadPhoto()); //话题发起人昵称 resultDTO.setIssuePublisherName(user.getShowName()); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml index 5d48526dfd..ac039d7cd0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDao.xml @@ -69,17 +69,6 @@ ORDER BY statistical_date ASC - -