From e2114f6c9ad8edf5f006b6ec81674109186643b2 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 27 Aug 2020 10:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=A7=E5=B1=8F=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E3=80=91-=E3=80=90=E9=A1=B9=E7=9B=AE=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E3=80=81=E8=AF=9D=E9=A2=98=E8=AF=84=E8=AE=BA=E5=85=9A=E5=91=98?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?-=EF=BC=88=E7=8E=8B=E7=AB=A5=EF=BC=89-2020/8/27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esua/epdc/service/impl/CommentServiceImpl.java | 13 +++++-------- .../epdc/service/impl/TopicCommentServiceImpl.java | 13 +++++-------- .../service/impl/EventCommentServiceImpl.java | 4 +++- .../service/impl/TopicCommentServiceImpl.java | 4 +++- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java index 8edab3246..743eec406 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java @@ -3,8 +3,6 @@ package com.elink.esua.epdc.service.impl; import com.elink.esua.epdc.async.WxMaSecCheckTask; import com.elink.esua.epdc.common.token.dto.TokenDto; -import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; -import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.comment.CommentStatementFormDTO; @@ -14,7 +12,6 @@ import com.elink.esua.epdc.dto.comment.form.SubmitCommentFormDTO; import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; import com.elink.esua.epdc.feign.CommentFeignClient; import com.elink.esua.epdc.service.CommentService; -import com.elink.esua.epdc.utils.UserTagUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -44,11 +41,11 @@ public class CommentServiceImpl implements CommentService { commentFormDTO.setUserFace(userDetail.getFaceImg()); commentFormDTO.setDeptId(userDetail.getGridId()); SubmitCommentFormDTO submitCommentFormDTO = ConvertUtils.sourceToTarget(commentFormDTO, SubmitCommentFormDTO.class); - if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { - submitCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); - } else { - submitCommentFormDTO.setPartyFlag(YesOrNoEnum.NO.value()); - } +// if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { +// submitCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); +// } else { +// submitCommentFormDTO.setPartyFlag(YesOrNoEnum.NO.value()); +// } return commentFeignClient.submit(submitCommentFormDTO); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java index 6c9290caa..0c0484cb7 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java @@ -3,8 +3,6 @@ package com.elink.esua.epdc.service.impl; import com.elink.esua.epdc.async.WxMaSecCheckTask; import com.elink.esua.epdc.common.token.dto.TokenDto; -import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; -import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; @@ -12,7 +10,6 @@ import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; import com.elink.esua.epdc.feign.TopicCommentFeignClient; import com.elink.esua.epdc.service.TopicCommentService; -import com.elink.esua.epdc.utils.UserTagUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -41,11 +38,11 @@ public class TopicCommentServiceImpl implements TopicCommentService { topicCommentFormDTO.setUserName(userDetail.getNickname()); topicCommentFormDTO.setUserFace(userDetail.getFaceImg()); topicCommentFormDTO.setDeptId(userDetail.getGridId()); - if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { - topicCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); - } else { - topicCommentFormDTO.setPartyFlag(YesOrNoEnum.NO.value()); - } +// if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { +// topicCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); +// } else { +// topicCommentFormDTO.setPartyFlag(YesOrNoEnum.NO.value()); +// } return topicCommentFeignClient.submit(topicCommentFormDTO); } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java index a60b10b92..1fba5c54c 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java @@ -165,9 +165,11 @@ public class EventCommentServiceImpl extends BaseServiceImpl textList = new ArrayList<>(); textList.add(commentFormDTO.getContent()); String mobile = null; + String partyFlag = ""; Result user = userInfoFeignClient.getUserInfoById(commentFormDTO.getUserId()); if(null != user.getData()){ mobile = user.getData().getMobile(); + partyFlag = user.getData().getPartyFlag(); } // 获取所有上级机构名称和ID拼接 ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(commentFormDTO.getDeptId()).getData(); @@ -190,7 +192,7 @@ public class EventCommentServiceImpl extends BaseServiceImpl textList = new ArrayList<>(); textList.add(commentFormDTO.getContent()); String mobile = null; + String partyFlag = ""; Result user = userInfoFeignClient.getUserInfoById(commentFormDTO.getUserId()); if(null != user.getData()){ mobile = user.getData().getMobile(); + partyFlag = user.getData().getPartyFlag(); } // 获取所有上级机构名称和ID拼接 ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(commentFormDTO.getDeptId()).getData(); @@ -169,7 +171,7 @@ public class TopicCommentServiceImpl extends BaseServiceImpl