Browse Source

Merge remote-tracking branch 'remotes/origin/dev' into release

dev_shibei_match
jianjun 5 years ago
parent
commit
0fc73fd86b
  1. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java
  2. 2
      epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml
  3. 2
      epmet-module/gov-issue/gov-issue-server/pom.xml
  4. 26
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java
  5. 44
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  6. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
  7. 2
      epmet-module/gov-project/gov-project-server/pom.xml
  8. 22
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  9. 28
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java
  10. 44
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  11. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml
  12. 2
      epmet-module/resi-group/resi-group-server/pom.xml
  13. 28
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java
  14. 66
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ModuleUtils.java

@ -2,7 +2,6 @@ package com.epmet.commons.tools.utils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.DingTalkTextMsg;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.CharEncoding; import org.apache.commons.codec.CharEncoding;
@ -38,9 +37,6 @@ public class ModuleUtils {
String errorMessage = "Failure to connect " + serverName; String errorMessage = "Failure to connect " + serverName;
String errorLog = errorMessage + "::[method]->{}::[params]->{}"; String errorLog = errorMessage + "::[method]->{}::[params]->{}";
log.error(errorLog, methodName, JSON.toJSONString(params)); log.error(errorLog, methodName, JSON.toJSONString(params));
DingdingMsgSender msgSender = new DingdingMsgSender();
DingTalkTextMsg dingTalkTextMsg = new DingTalkTextMsg();
msgSender.sendMsgAsync(dingTalkTextMsg);
return new Result().error(); return new Result().error();
} }

2
epmet-module/gov-issue/gov-issue-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
gov-issue-server: gov-issue-server:
container_name: gov-issue-server-dev container_name: gov-issue-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.47 image: 192.168.1.130:10080/epmet-cloud-dev/gov-issue-server:0.3.49
ports: ports:
- "8101:8101" - "8101:8101"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.47</version> <version>0.3.49</version>
<parent> <parent>
<artifactId>gov-issue</artifactId> <artifactId>gov-issue</artifactId>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

26
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java

@ -157,18 +157,20 @@ public class IssueSatisfactionDetailServiceImpl extends BaseServiceImpl<IssueSat
public void evaluate(EvaluateFormDTO formDTO) { public void evaluate(EvaluateFormDTO formDTO) {
String comment = formDTO.getComment(); String comment = formDTO.getComment();
//议题评论内容审核 //议题评论内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (StringUtils.isNotBlank(comment)) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(comment); TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); taskDTO.setContent(comment);
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
log.error(String.format(IssueConstant.REVIEW_ISSUE,comment)); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); log.error(String.format(IssueConstant.REVIEW_ISSUE, comment));
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
IssueSatisfactionDetailEntity entity = new IssueSatisfactionDetailEntity(); IssueSatisfactionDetailEntity entity = new IssueSatisfactionDetailEntity();

44
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -362,16 +362,18 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void closeIssue(CloseIssueFormDTO formDTO) { public void closeIssue(CloseIssueFormDTO formDTO) {
//公开回复内容审核 //公开回复内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (StringUtils.isNotBlank(formDTO.getCloseReason())) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(formDTO.getCloseReason()); TextTaskDTO taskDTO = new TextTaskDTO();
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setContent(formDTO.getCloseReason());
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()){
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
@ -504,16 +506,18 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void shiftProject(ShiftProjectFormDTO formDTO) { public void shiftProject(ShiftProjectFormDTO formDTO) {
//公开回复内容审核 //公开回复内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (StringUtils.isNotBlank(formDTO.getPublicReply())) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(formDTO.getPublicReply()); TextTaskDTO taskDTO = new TextTaskDTO();
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setContent(formDTO.getPublicReply());
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
gov-project-server: gov-project-server:
container_name: gov-project-server-dev container_name: gov-project-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.32 image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.34
ports: ports:
- "8102:8102" - "8102:8102"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/gov-project/gov-project-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.32</version> <version>0.3.34</version>
<parent> <parent>
<artifactId>gov-project</artifactId> <artifactId>gov-project</artifactId>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

22
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -187,16 +187,18 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void transfer(TransferFormDTO formDTO) { public void transfer(TransferFormDTO formDTO) {
//公开回复内容审核 //公开回复内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (StringUtils.isNotBlank(formDTO.getPublicReply())) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(formDTO.getPublicReply()); TextTaskDTO taskDTO = new TextTaskDTO();
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setContent(formDTO.getPublicReply());
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }

28
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java

@ -189,19 +189,21 @@ public class ProjectSatisfactionDetailServiceImpl extends BaseServiceImpl<Projec
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void projectEvaluate(ProjectEvaluateFormDTO formDTO) { public void projectEvaluate(ProjectEvaluateFormDTO formDTO) {
String comment = formDTO.getComment(); String comment = formDTO.getComment();
//项目满意度评价内容审核 if (StringUtils.isNotBlank(comment)) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); //项目满意度评价内容审核
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(comment); TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); taskDTO.setContent(comment);
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
log.error(String.format(ProjectConstant.REVIEW_PROJECT,comment)); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); log.error(String.format(ProjectConstant.REVIEW_PROJECT, comment));
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
ProjectSatisfactionDetailEntity entity = new ProjectSatisfactionDetailEntity(); ProjectSatisfactionDetailEntity entity = new ProjectSatisfactionDetailEntity();

44
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -300,16 +300,18 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void closed(ProjectClosedFromDTO fromDTO) { public void closed(ProjectClosedFromDTO fromDTO) {
//公开回复内容审核 //公开回复内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (StringUtils.isNotBlank(fromDTO.getPublicReply())) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(fromDTO.getPublicReply()); TextTaskDTO taskDTO = new TextTaskDTO();
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setContent(fromDTO.getPublicReply());
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
@ -376,16 +378,18 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void projectReturn(ReturnFromDTO fromDTO) { public void projectReturn(ReturnFromDTO fromDTO) {
//公开回复内容审核 //公开回复内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); if (com.alibaba.nacos.client.utils.StringUtils.isNotBlank(fromDTO.getPublicReply())) {
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(fromDTO.getPublicReply()); TextTaskDTO taskDTO = new TextTaskDTO();
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setContent(fromDTO.getPublicReply());
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
resi-group-server: resi-group-server:
container_name: resi-group-server-dev container_name: resi-group-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.54 image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.55
ports: ports:
- "8095:8095" - "8095:8095"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/resi-group/resi-group-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.3.54</version> <version>0.3.55</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId> <artifactId>resi-group</artifactId>

28
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java

@ -165,19 +165,21 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl<ResiTopicCommen
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result commentTopic(TokenDto tokenDto, ResiPublishCommentFormDTO resiCommentFormDTO) { public Result commentTopic(TokenDto tokenDto, ResiPublishCommentFormDTO resiCommentFormDTO) {
String commentContent = resiCommentFormDTO.getCommentContent(); String commentContent = resiCommentFormDTO.getCommentContent();
//评论话题内容审核 if (StringUtils.isNotBlank(commentContent)) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); //评论话题内容审核
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(commentContent); TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); taskDTO.setContent(commentContent);
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
log.error(String.format(TopicConstant.REVIEW_TOPIC,commentContent)); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); log.error(String.format(TopicConstant.REVIEW_TOPIC, commentContent));
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
//1.判断当前用户是否被禁言 //1.判断当前用户是否被禁言

66
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -217,19 +217,21 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
public Result createTopic(TokenDto tokenDto, ResiTopicPublishFormDTO resiTopicPublishFormDTO) { public Result createTopic(TokenDto tokenDto, ResiTopicPublishFormDTO resiTopicPublishFormDTO) {
String topicContent = resiTopicPublishFormDTO.getTopicContent(); String topicContent = resiTopicPublishFormDTO.getTopicContent();
List<String> attachmentList = resiTopicPublishFormDTO.getAttachmentList(); List<String> attachmentList = resiTopicPublishFormDTO.getAttachmentList();
//创建话题内容审核 if (StringUtils.isNotBlank(topicContent)) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); //创建话题内容审核
TextTaskDTO taskDTO = new TextTaskDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
taskDTO.setContent(topicContent); TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); taskDTO.setContent(topicContent);
textScanParamDTO.getTasks().add(taskDTO); taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); textScanParamDTO.getTasks().add(taskDTO);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
log.error(String.format(TopicConstant.CREATE_TOPIC,topicContent)); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); log.error(String.format(TopicConstant.CREATE_TOPIC, topicContent));
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
//创建话题图片审核 //创建话题图片审核
@ -1099,24 +1101,26 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
//话题转议题审核:标题、建议 //话题转议题审核:标题、建议
String issueTitle = topicTurnIssueFromDTO.getIssueTitle(); String issueTitle = topicTurnIssueFromDTO.getIssueTitle();
String suggestion = topicTurnIssueFromDTO.getSuggestion(); String suggestion = topicTurnIssueFromDTO.getSuggestion();
TextScanParamDTO textScan = new TextScanParamDTO(); if (StringUtils.isNotBlank(issueTitle) || StringUtils.isNotBlank(suggestion)) {
//标题 TextScanParamDTO textScan = new TextScanParamDTO();
TextTaskDTO taskTitle = new TextTaskDTO(); //标题
taskTitle.setContent(issueTitle); TextTaskDTO taskTitle = new TextTaskDTO();
taskTitle.setDataId(UUID.randomUUID().toString().replace("-", "")); taskTitle.setContent(issueTitle);
textScan.getTasks().add(taskTitle); taskTitle.setDataId(UUID.randomUUID().toString().replace("-", ""));
//建议 textScan.getTasks().add(taskTitle);
TextTaskDTO taskSuggestion = new TextTaskDTO(); //建议
taskSuggestion.setDataId(UUID.randomUUID().toString().replace("-", "")); TextTaskDTO taskSuggestion = new TextTaskDTO();
taskSuggestion.setContent(suggestion); taskSuggestion.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScan.getTasks().add(taskSuggestion); taskSuggestion.setContent(suggestion);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); textScan.getTasks().add(taskSuggestion);
if (!textSyncScanResult.success()){ Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if (!textSyncScanResult.success()) {
} else { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
if (!textSyncScanResult.getData().isAllPass()) { } else {
log.error(String.format(TopicConstant.SHIFT_ISSUE,issueTitle,suggestion)); if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); log.error(String.format(TopicConstant.SHIFT_ISSUE, issueTitle, suggestion));
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
} }
} }
//1.统一时间(群组服务 -> 议题服务) //1.统一时间(群组服务 -> 议题服务)

Loading…
Cancel
Save