From 9b8b1bf051d074235af62db9fe8017f5712fdfe9 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 1 Jun 2020 13:48:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=A1=A8=E5=86=B3?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/redis/IssueVoteDetailRedis.java | 11 +++----- .../impl/IssueVoteStatisticalServiceImpl.java | 27 +++++-------------- .../java/com/epmet/utils/ModuleConstants.java | 5 ++++ .../impl/RegisterRelationServiceImpl.java | 7 +++-- 4 files changed, 20 insertions(+), 30 deletions(-) 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 2ae91874d3..268ddfbf88 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 @@ -23,14 +23,12 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IssueConstant; import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueVoteStatisticalDTO; import com.epmet.dto.form.CommonGridIdFormDTO; import com.epmet.dto.form.VoteRedisFormDTO; -import com.epmet.entity.IssueVoteStatisticalEntity; import com.epmet.feign.ResiGroupFeignClient; import com.epmet.service.IssueService; import com.epmet.service.IssueVoteDetailService; -import com.epmet.service.IssueVoteStatisticalService; +import com.epmet.utils.ModuleConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,9 +53,6 @@ public class IssueVoteDetailRedis { @Autowired private RedisUtils redisUtils; - @Autowired - private IssueVoteStatisticalService issueVoteStatisticalService; - @Autowired private ResiGroupFeignClient resiGroupFeignClient; @@ -166,7 +161,7 @@ public class IssueVoteDetailRedis { } }else{ //如果没有该议题,终止所有操作 - logger.warn(String.format("找不到指定Id的议题,Id:【%s】",issueId)); + logger.warn(String.format(ModuleConstants.ISSUE_NOT_FOUND_EXCEPTION_TEMPLATE,issueId)); return null; } @@ -208,7 +203,7 @@ public class IssueVoteDetailRedis { set(voteCache); return voteCache; }else{ - logger.warn(String.format("找不到指定Id的议题,Id:【%s】",issueId)); + logger.warn(String.format(ModuleConstants.ISSUE_NOT_FOUND_EXCEPTION_TEMPLATE,issueId)); return null; } } 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 4bb9611e45..320138bfc5 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 @@ -302,7 +302,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl> entry : summaryMap.entrySet()) { IssueVoteStatisticalDTO obj = new IssueVoteStatisticalDTO(); - obj.setCreatedBy("system"); + obj.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM); obj.setIssueId(entry.getKey()); List v = entry.getValue(); if (v.size() > NumConstant.ONE) { @@ -338,7 +338,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl v = entry.getValue(); for(IssueDTO issue : v){ - //TODO 待删除 - Integer a = issueVoteDetailService.getVotingCount(issue.getId(),IssueConstant.SUPPORT); - //TODO 待删除 - Integer b = issueVoteDetailService.getVotingCount(issue.getId(),IssueConstant.OPPOSE); IssueVoteStatisticalDTO vote = new IssueVoteStatisticalDTO(); vote.setIssueId(issue.getId()); @@ -479,31 +475,22 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl Date: Mon, 1 Jun 2020 17:18:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=94=BF=E5=BA=9C=E7=AB=AF=E5=92=8C?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/constant/ServiceConstant.java | 10 ++++++++++ epmet-module/gov-voice/gov-voice-server/pom.xml | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java index 3ac97e8e0e..67a0f8ea1a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java @@ -103,4 +103,14 @@ public interface ServiceConstant { * 共通 */ String EPMET_COMMON_SERVICE = "common-service-server"; + + /** + * 政府端-党建声音 + */ + String GOV_VOICE_SERVER="gov-voice-server"; + + /** + * 居民端-党建声音 + */ + String RESI_VOICE_SERVER="resi-voice-server"; } diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 08445aff20..aee9221446 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -94,9 +94,9 @@ - + - epmet_voice_user + epmet_gov_voice_user EpmEt-db-UsEr 0 @@ -122,6 +122,12 @@ 8104 test + + + + + epmet + elink@833066 0 r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com