Browse Source

内容审核功能优化

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
2a457dfc74
  1. 9
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java
  2. 83
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/advice/service/impl/AdviceServiceImpl.java
  3. 80
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java
  4. 83
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java
  5. 80
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java
  6. 90
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java
  7. 82
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  8. 85
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  9. 8
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActApplyInfoController.java
  10. 80
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java
  11. 198
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  12. 88
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java
  13. 87
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicCommentServiceImpl.java
  14. 80
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java

9
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/security/content/CheckDataUtils.java

@ -2,6 +2,7 @@ package com.elink.esua.epdc.commons.tools.security.content;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.CheckContentFormDTO;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.CheckDataFromDTO;
@ -114,7 +115,7 @@ public class CheckDataUtils {
log.error("内容校验接口异常:" + e.getMessage());
return null;
}
log.info("审核返回数据:" + response.body());
log.info("审核返回数据:" + JSONUtil.parse(response));
JSONObject res = JSONObject.parseObject(response.body());
//审核成功
if (0 == Integer.valueOf(res.get("code").toString())) {
@ -168,7 +169,7 @@ public class CheckDataUtils {
e.printStackTrace();
log.error("内容校验接口异常:" + e.getMessage());
}
log.info("审核返回数据:" + response.body());
log.info("审核返回数据:" + JSONUtil.parse(response));
JSONObject res = JSONObject.parseObject(response.body());
//审核成功
if (0 == Integer.valueOf(res.get("code").toString())) {
@ -176,11 +177,11 @@ public class CheckDataUtils {
if (200 == result.getDetails().get(0).getCode()) {
return result;
} else {
log.error("内容审核返回信息错误:" + res);
log.error("图片审核返回信息错误:" + res);
return null;
}
} else {
log.error("内容审核返回信息错误:" + res);
log.error("图片审核返回信息错误:" + res);
return null;
}
}

83
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/advice/service/impl/AdviceServiceImpl.java

@ -45,6 +45,7 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -62,6 +63,7 @@ import java.util.Map;
* @since v1.0.0 2021-03-02
*/
@Service
@Slf4j
public class AdviceServiceImpl extends BaseServiceImpl<AdviceDao, AdviceEntity> implements AdviceService {
@Autowired
private CustomImgService customImgService;
@ -145,21 +147,30 @@ public class AdviceServiceImpl extends BaseServiceImpl<AdviceDao, AdviceEntity>
@Transactional(rollbackFor = Exception.class)
public Result saveAdvice(AdviceSubmitFormDTO formDto) {
//内容审核 - start
Boolean isConReview = formDto.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDto.getContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
Boolean isConReview = null;
List<String> textList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
try {
isConReview = formDto.getIsConReview();
textList = new ArrayList<>();
textList.add(formDto.getContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
AdviceEntity entity = ConvertUtils.sourceToTarget(formDto, AdviceEntity.class);
@ -169,28 +180,32 @@ public class AdviceServiceImpl extends BaseServiceImpl<AdviceDao, AdviceEntity>
}
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end

80
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java

@ -57,6 +57,7 @@ import com.elink.esua.epdc.modules.reportissue.dao.CustomImgDao;
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -71,6 +72,7 @@ import java.util.*;
* @since v1.0.0 2020-12-02
*/
@Service
@Slf4j
public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, GroupBuyInfoEntity> implements GroupBuyInfoService {
@Autowired
@ -209,20 +211,28 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
}
//内容审核 - start
Boolean isConReview = formDTO.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDTO.getGroupBuyContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getGroupBuyMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
Boolean isConReview = null;
List<String> textList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
try {
isConReview = formDTO.getIsConReview();
textList = new ArrayList<>();
textList.add(formDTO.getGroupBuyContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getGroupBuyMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
@ -240,28 +250,32 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(),null,null, null,formDTO.getGroupBuyMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(), null, null, twoTypes, formDTO.getGroupBuyMobile(), "0",deptDto);
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(),null,null, null,formDTO.getGroupBuyMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.GROUP_BUY_CONTENT.getCode(), textList,
null, groupBuyInfoEntity.getId(), null, null, twoTypes, formDTO.getGroupBuyMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
return new Result();

83
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/reportissue/service/impl/ReportIssueServiceImpl.java

@ -45,6 +45,7 @@ import com.elink.esua.epdc.modules.reportissue.service.CustomImgService;
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -62,6 +63,7 @@ import java.util.Map;
* @since v1.0.0 2020-10-22
*/
@Service
@Slf4j
public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, ReportIssueEntity> implements ReportIssueService {
@Autowired
@ -147,21 +149,30 @@ public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, Repo
@Transactional(rollbackFor = Exception.class)
public Result saveReportIssue(ReportIssueSubmitFormDTO formDto) {
//内容审核 - start
Boolean isConReview = formDto.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDto.getContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
Boolean isConReview = null;
List<String> textList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
try {
isConReview = formDto.getIsConReview();
textList = new ArrayList<>();
textList.add(formDto.getContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
ReportIssueEntity entity = ConvertUtils.sourceToTarget(formDto, ReportIssueEntity.class);
@ -171,28 +182,32 @@ public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, Repo
}
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.REPORT_ISSUE.getCode(), textList,
formDto.getImages(), entity.getId(), null, null, twoTypes, formDto.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end

80
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java

@ -176,20 +176,28 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
@Transactional(rollbackFor = Exception.class)
public Result publishOrUpdate(EpdcAddSdsFormDTO formDTO) {
//内容审核 - start
Boolean isConReview = formDTO.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDTO.getCarryContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.SDS_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
Boolean isConReview = null;
List<String> textList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
try {
isConReview = formDTO.getIsConReview();
textList = new ArrayList<>();
textList.add(formDTO.getCarryContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.SDS_CONTENT.getCode(), textList,
null, null,contentResult, null,null,formDTO.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
if(formDTO.getDepartureTime().before(new Date())){
@ -204,29 +212,33 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
}
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(),null,null, null,formDTO.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if((contentResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(), null, null, twoTypes, formDTO.getMobile(), "0",deptDto);
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(),null,null, null,formDTO.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(),
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.SDS_CONTENT.getCode(), textList,
null, sdsInfoEntity.getId(), null, null, twoTypes, formDTO.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
//内容审核 - end
return new Result();

90
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java

@ -58,6 +58,7 @@ import com.elink.esua.epdc.modules.issue.service.IssueService;
import com.elink.esua.epdc.modules.item.entity.ItemEntity;
import com.elink.esua.epdc.modules.item.service.ItemService;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -163,26 +164,34 @@ public class EventCommentServiceImpl extends BaseServiceImpl<EventCommentDao, Ev
public Result submit(CommentFormDTO commentFormDTO) {
//内容审核 - start
Boolean isConReview = commentFormDTO.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(commentFormDTO.getContent());
Boolean isConReview = null;
CheckResultDTO contentResult = null;
String mobile = null;
Result<UserDTO> user = userFeignClient.getUserInfoById(commentFormDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(commentFormDTO.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(commentFormDTO.getUserId(),
commentFormDTO.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ISSUE_COMMENT.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
ParentAndAllDeptDTO deptDto = null;
List<String> textList = new ArrayList<>();
try {
isConReview = commentFormDTO.getIsConReview();
textList.add(commentFormDTO.getContent());
Result<UserDTO> user = userFeignClient.getUserInfoById(commentFormDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(commentFormDTO.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(commentFormDTO.getUserId(),
commentFormDTO.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ISSUE_COMMENT.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
}catch (Exception e){
logger.error(e.getMessage());
}
//内容审核 - end
@ -291,30 +300,35 @@ public class EventCommentServiceImpl extends BaseServiceImpl<EventCommentDao, Ev
newsTask.insertUserInformation(informationFormDTO);
//内容审核 - 开始
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(commentFormDTO.getUserId(),
commentFormDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_COMMENT.getCode(), textList,
null, commentEntity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(commentFormDTO.getUserId(),
commentFormDTO.getUserName(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_COMMENT.getCode(), textList,
null,commentEntity.getId(), null,null,twoTypes,mobile,"0",deptDto);
commentFormDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_COMMENT.getCode(), textList,
null, commentEntity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(commentFormDTO.getUserId(),
commentFormDTO.getUserName(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_COMMENT.getCode(), textList,
null,commentEntity.getId(), null,null,twoTypes,mobile,"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
}catch (Exception e){
logger.error(e.getMessage());
}
//内容审核 - 结束
return new Result();

82
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java

@ -76,6 +76,7 @@ import com.elink.esua.epdc.modules.item.service.ItemService;
import com.elink.esua.epdc.modules.rocketmq.dto.CategoryModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -90,6 +91,7 @@ import java.util.*;
* @since v1.0.0 2019-09-04
*/
@Service
@Slf4j
public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEventsEntity> implements EpdcEventsService {
@Autowired
@ -169,22 +171,31 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
@Transactional(rollbackFor = Exception.class)
public Result<EpdcEventsEntity> saveEvent(EpdcEventSubmitFormDTO dto) {
//内容审核 - start
Boolean isConReview = dto.getIsConReview();
Boolean isConReview = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
ParentAndAllDeptDTO deptDto = null;
List<String> textList = new ArrayList<>();
textList.add(dto.getEventContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(dto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(),
dto.getNickName(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), null,contentResult, imgResult,null,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
try {
isConReview = dto.getIsConReview();
textList.add(dto.getEventContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(dto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(),
dto.getNickName(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), null,contentResult, imgResult,null,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
}catch (Exception e){
log.error(e.getMessage());
}
//内容审核 - end
EpdcEventsEntity entity = ConvertUtils.sourceToTarget(dto, EpdcEventsEntity.class);
insert(entity);
@ -204,29 +215,34 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
//内容审核 - start
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(),
dto.getNickName(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(),
dto.getNickName(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), entity.getId(), null, null, twoTypes, dto.getMobile(), "0",deptDto);
dto.getNickName(), CheckDataUtils.cate_two, null,ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getUserId(),
dto.getNickName(), CheckDataUtils.cate_two, null, ModuleName.ISSUE_SUBMIT.getCode(), textList,
dto.getImages(), entity.getId(), null, null, twoTypes, dto.getMobile(), "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
}catch (Exception e){
log.error(e.getMessage());
}
//内容审核 - end

85
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -310,26 +310,34 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
ItemEntity itemEntityResult = baseDao.selectById(evaluationFormDTO.getItemId());
if (itemEntityResult.getUserId().equals(evaluationFormDTO.getUserId()) && itemEntityResult.getEvaluationScore() == null) {
//内容审核 - start
Boolean isConReview = evaluationFormDTO.getIsConReview();
Boolean isConReview = null;
CheckResultDTO contentResult = null;
String mobile = null;
Result<UserDTO> user = userFeignClient.getUserInfoById(evaluationFormDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(evaluationFormDTO.getDeptId()).getData();
ParentAndAllDeptDTO deptDto = null;
List<String> textList = new ArrayList<>();
textList.add(evaluationFormDTO.getEvaluationContent());
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(),
evaluationFormDTO.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ITEM_SATISFACTION.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
try {
isConReview = evaluationFormDTO.getIsConReview();
Result<UserDTO> user = userFeignClient.getUserInfoById(evaluationFormDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(evaluationFormDTO.getDeptId()).getData();
textList.add(evaluationFormDTO.getEvaluationContent());
contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(),
evaluationFormDTO.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ITEM_SATISFACTION.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
}catch (Exception e){
logger.error(e.getMessage());
}
//内容审核 - end
ItemEntity itemEntity = new ItemEntity();
@ -342,29 +350,34 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
//内容审核- 开始
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(),
evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.ITEM_SATISFACTION.getCode(), textList,
null, itemEntity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if(contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(),
evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null, ModuleName.ITEM_SATISFACTION.getCode(), textList,
null,itemEntity.getId(), null,null,twoTypes,mobile,"0",deptDto);
evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.ITEM_SATISFACTION.getCode(), textList,
null, itemEntity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if(contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(),
evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null, ModuleName.ITEM_SATISFACTION.getCode(), textList,
null,itemEntity.getId(), null,null,twoTypes,mobile,"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
}catch (Exception e){
logger.error(e.getMessage());
}
//内容审核 - 结束
return new Result();

8
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActApplyInfoController.java

@ -33,6 +33,9 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.modules.activity.excel.ActApplyInfoExcel;
import com.elink.esua.epdc.modules.activity.service.ActApplyInfoService;
import com.oracle.tools.packager.Log;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -49,6 +52,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping("actapplyinfo")
@Slf4j
public class ActApplyInfoController {
@Autowired
@ -137,8 +141,10 @@ public class ActApplyInfoController {
**/
@GetMapping("applyActDetail/{id}")
public Result<ActApplyDetailResultDTO> applyActDetail(@PathVariable String id){
Log.info("活动详情ID为:" + id);
ActApplyDetailResultDTO actApplyDetailResultDTO = ConvertUtils.sourceToTarget(actApplyInfoService.get(id), ActApplyDetailResultDTO.class);
switch(actApplyDetailResultDTO.getActStatus()){
Log.info("活动状态为:" + actApplyDetailResultDTO.getActStatus());
switch(StringUtils.isBlank(actApplyDetailResultDTO.getActStatus())?"":actApplyDetailResultDTO.getActStatus()){
case "0":
actApplyDetailResultDTO.setActStatus("待审核");
break;

80
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActApplyInfoServiceImpl.java

@ -144,49 +144,61 @@ public class ActApplyInfoServiceImpl extends BaseServiceImpl<ActApplyInfoDao, Ac
return new Result().error("开始时间不能大于结束时间");
}
//内容审核 - start
Boolean isConReview = dto.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(dto.getActContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ACT_APPLY.getCode(), textList,null, null,contentResult,
null,null,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
Boolean isConReview = null;
List<String> textList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
try {
isConReview = dto.getIsConReview();
textList = new ArrayList<>();
textList.add(dto.getActContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.ACT_APPLY.getCode(), textList,null, null,contentResult,
null,null,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - end
ActApplyInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActApplyInfoEntity.class);
insert(entity);
//内容审核 - 开始
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ACT_APPLY.getCode(), textList,
null, entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ACT_APPLY.getCode(), textList,
null,entity.getId(), null,null,twoTypes,dto.getMobile(),"0",deptDto);
dto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.ACT_APPLY.getCode(), textList,
null, entity.getId(),null,null, null,dto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(dto.getApplyUserId(),
dto.getNickname(), CheckDataUtils.cate_two, null, ModuleName.ACT_APPLY.getCode(), textList,
null,entity.getId(), null,null,twoTypes,dto.getMobile(),"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - 结束
return new Result();

198
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java

@ -152,31 +152,43 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
@Transactional(rollbackFor = Exception.class)
public Result save(ActInfoDTO dto) {
//内容审核 - start
Boolean isConReview = dto.getIsConReview();
Boolean isConReview = null;
String userName = null;
String userId = null;
if(null != SecurityUser.getUser()){
userName = SecurityUser.getUser().getUsername();
userId = SecurityUser.getUser().getId().toString();
}
List<String> textList = new ArrayList<>();
textList.add(dto.getTitle());
textList.add(dto.getActContent());
List<String> imgList = new ArrayList<>();
imgList.add(dto.getHeadPic());
imgList.add(dto.getBannerUrl());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(imgList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, CheckDataUtils.decision_one, ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, null,contentResult, imgResult,null,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
List<String> textList = null;
List<String> imgList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
try {
isConReview = dto.getIsConReview();
userName = null;
userId = null;
if(null != SecurityUser.getUser()){
userName = SecurityUser.getUser().getUsername();
userId = SecurityUser.getUser().getId().toString();
}
textList = new ArrayList<>();
textList.add(dto.getTitle());
textList.add(dto.getActContent());
imgList = new ArrayList<>();
imgList.add(dto.getHeadPic());
imgList.add(dto.getBannerUrl());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(imgList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, CheckDataUtils.decision_one, ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, null,contentResult, imgResult,null,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - end
ActInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class);
@ -187,28 +199,32 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
//内容审核- 开始
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, null,dto.getTel(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, twoTypes,dto.getTel(),"0",deptDto);
imgList, entity.getId(),null,null, null,dto.getTel(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, twoTypes,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - 结束
return new Result();
@ -228,31 +244,43 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
@Transactional(rollbackFor = Exception.class)
public Result updateWithContent(ActInfoDTO dto) {
//内容审核 - start
Boolean isConReview = dto.getIsConReview();
Boolean isConReview = null;
String userName = null;
String userId = null;
if(null != SecurityUser.getUser()){
userName = SecurityUser.getUser().getUsername();
userId = SecurityUser.getUser().getId().toString();
}
List<String> textList = new ArrayList<>();
textList.add(dto.getTitle());
textList.add(dto.getActContent());
List<String> imgList = new ArrayList<>();
imgList.add(dto.getHeadPic());
imgList.add(dto.getBannerUrl());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(imgList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, CheckDataUtils.decision_one, ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, null,contentResult, imgResult,null,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
List<String> textList = null;
List<String> imgList = null;
ParentAndAllDeptDTO deptDto = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
try {
isConReview = dto.getIsConReview();
userName = null;
userId = null;
if(null != SecurityUser.getUser()){
userName = SecurityUser.getUser().getUsername();
userId = SecurityUser.getUser().getId().toString();
}
textList = new ArrayList<>();
textList.add(dto.getTitle());
textList.add(dto.getActContent());
imgList = new ArrayList<>();
imgList.add(dto.getHeadPic());
imgList.add(dto.getBannerUrl());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(imgList);
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, CheckDataUtils.decision_one, ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, null,contentResult, imgResult,null,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - end
ActInfoEntity entity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class);
@ -260,29 +288,33 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
updateKindnessTime(dto);
updateById(entity);
//内容审核- 开始
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, null,dto.getTel(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, twoTypes,dto.getTel(),"0",deptDto);
imgList, entity.getId(),null,null, null,dto.getTel(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(userId,
userName, CheckDataUtils.cate_one, null,ModuleName.HELP_ACTIVITY.getCode(), textList,
imgList, entity.getId(),null,null, twoTypes,dto.getTel(),"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - 结束
return new Result();

88
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java

@ -344,26 +344,36 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
return new Result().error("请上传打卡图片");
}
//内容审核 - start
Boolean isConReview = appActUserClockLogDTO.getIsConReview();
Boolean isConReview = null;
String mobile = null;
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(appActUserClockLogDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(appActUserClockLogDTO.getDeptId()).getData();
List<String> textList = new ArrayList<>();
textList.add(appActUserClockLogDTO.getClockDesc());
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(appActUserClockLogDTO.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(appActUserClockLogDTO.getUserId(),
appActUserClockLogDTO.getUserName(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.HELP_SIGNIN.getCode(), textList,
appActUserClockLogDTO.getImages(), null,contentResult, imgResult,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
ParentAndAllDeptDTO deptDto = null;
List<String> textList = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
try {
isConReview = appActUserClockLogDTO.getIsConReview();
mobile = null;
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(appActUserClockLogDTO.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(appActUserClockLogDTO.getDeptId()).getData();
textList = new ArrayList<>();
textList.add(appActUserClockLogDTO.getClockDesc());
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(appActUserClockLogDTO.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(appActUserClockLogDTO.getUserId(),
appActUserClockLogDTO.getUserName(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.HELP_SIGNIN.getCode(), textList,
appActUserClockLogDTO.getImages(), null,contentResult, imgResult,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - end
//查询人员活动关系Id(可打卡的)
@ -404,28 +414,32 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
actInfoService.addClockNum(appActUserClockLogDTO.getActId());
//内容审核 - 开始
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(appActUserClockLogDTO.getUserId(),
appActUserClockLogDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.HELP_SIGNIN.getCode(), textList,
appActUserClockLogDTO.getImages(), entity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(appActUserClockLogDTO.getUserId(),
appActUserClockLogDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.HELP_SIGNIN.getCode(), textList,
appActUserClockLogDTO.getImages(), entity.getId(),null,null, twoTypes,mobile,"0",deptDto);
appActUserClockLogDTO.getImages(), entity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(appActUserClockLogDTO.getUserId(),
appActUserClockLogDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.HELP_SIGNIN.getCode(), textList,
appActUserClockLogDTO.getImages(), entity.getId(),null,null, twoTypes,mobile,"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
} catch (Exception e) {
e.printStackTrace();
}
//内容审核 - 结束

87
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicCommentServiceImpl.java

@ -46,6 +46,7 @@ import com.elink.esua.epdc.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.service.PartyTopicCommentService;
import com.elink.esua.epdc.service.PartyTopicService;
import com.elink.esua.epdc.service.PartyUserGroupService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -60,6 +61,7 @@ import java.util.*;
* @since v1.0.0 2020-05-29
*/
@Service
@Slf4j
public class PartyTopicCommentServiceImpl extends BaseServiceImpl<PartyTopicCommentDao, PartyTopicCommentEntity> implements PartyTopicCommentService {
@Autowired
@ -146,25 +148,33 @@ public class PartyTopicCommentServiceImpl extends BaseServiceImpl<PartyTopicComm
@Override
public Result saveTopicComment(PartyTopicCommentFormDTO formDto) {
//内容审核 - 开始
Boolean isConReview = formDto.getIsConReview();
List<String> textList = new ArrayList<>();
textList.add(formDto.getContent());
Boolean isConReview = null;
CheckResultDTO contentResult = null;
String mobile = null;
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(formDto.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
ParentAndAllDeptDTO deptDto = null;
List<String> textList = new ArrayList<>();
try {
isConReview = formDto.getIsConReview();
textList.add(formDto.getContent());
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(formDto.getUserId());
if(null != user.getData()){
mobile = user.getData().getMobile();
}
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
}
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getDeptId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
if (!isConReview && (contentResult != null && !contentResult.getAllPass())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one,
ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,null, null,contentResult,
null,null,mobile,"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
catch (Exception e){
log.error(e.getMessage());
}
//内容审核 - 结束
@ -206,30 +216,33 @@ public class PartyTopicCommentServiceImpl extends BaseServiceImpl<PartyTopicComm
//内容审核 - 开始
//接口异常,保存至待审核信息
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getUserName(), CheckDataUtils.cate_two, null,ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,
null, entity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
if(contentResult == null && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getUserName(), CheckDataUtils.cate_two, null, ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,
null, entity.getId(), null, null, twoTypes, mobile, "0",deptDto);
formDto.getUserName(), CheckDataUtils.cate_two, null,ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,
null, entity.getId(),null,null, null,mobile,"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//判断是否为待审核
if (contentResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getUserName(), CheckDataUtils.cate_two, null, ModuleName.PARTY_GROUP_TOPIC_COMMENT.getCode(), textList,
null, entity.getId(), null, null, twoTypes, mobile, "0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
}catch (Exception e){
log.error(e.getMessage());
}
return new Result();
}

80
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java

@ -53,6 +53,8 @@ import com.elink.esua.epdc.service.PartyTopicImgService;
import com.elink.esua.epdc.service.PartyTopicService;
import com.elink.esua.epdc.service.PartyTopicUserAttitudeService;
import com.elink.esua.epdc.service.PartyUserGroupService;
import com.oracle.tools.packager.Log;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -67,6 +69,7 @@ import java.util.*;
* @since v1.0.0 2020-05-29
*/
@Service
@Slf4j
public class PartyTopicServiceImpl extends BaseServiceImpl<PartyTopicDao, PartyTopicEntity> implements PartyTopicService {
@Autowired
@ -184,22 +187,31 @@ public class PartyTopicServiceImpl extends BaseServiceImpl<PartyTopicDao, PartyT
return new Result().error("用户已被禁言");
}
//内容审核 - 开始
Boolean isConReview = formDto.getIsConReview();
Boolean isConReview = null;
CheckResultDTO contentResult = null;
CheckResultDTO imgResult = null;
ParentAndAllDeptDTO deptDto = null;
List<String> textList = new ArrayList<>();
textList.add(formDto.getTopicContent());
// 获取所有上级机构名称和ID拼接
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getGridId()).getData();
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList);
CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.PARTY_GROUP_TOPIC.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
try {
isConReview = formDto.getIsConReview();
textList.add(formDto.getTopicContent());
// 获取所有上级机构名称和ID拼接
deptDto = adminFeignClient.getParentAndAllDept(formDto.getGridId()).getData();
contentResult = CheckDataUtils.checkContent(textList);
imgResult = CheckDataUtils.checkImgs(formDto.getImages());
if(!isConReview &&
((contentResult != null && !contentResult.getAllPass()) || (imgResult != null && !imgResult.getAllPass()))){
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.PARTY_GROUP_TOPIC.getCode(), textList,
formDto.getImages(), null,contentResult, imgResult,null,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message);
}
}catch (Exception e){
log.error(e.getMessage());
}
//内容审核 - 结束
@ -212,28 +224,32 @@ public class PartyTopicServiceImpl extends BaseServiceImpl<PartyTopicDao, PartyT
partyTopicImgService.saveImgs(images,entity.getId());
//内容审核 - 开始
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.PARTY_GROUP_TOPIC.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
try {
//接口异常,保存至待审核信息
if((contentResult == null || imgResult == null) && !isConReview) {
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.PARTY_GROUP_TOPIC.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, twoTypes,formDto.getMobile(),"0",deptDto);
formDto.getImages(), entity.getId(),null,null, null,formDto.getMobile(),"1",deptDto);
contentSecurityFeign.insertRecords(record);
}
//保存待审核记录
if (contentResult != null && imgResult != null) {
CheckResultMessageDTO twoTypes = null;
if(isConReview){
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, imgResult);
}else{
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
}
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) {
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDto.getUserId(),
formDto.getNickname(), CheckDataUtils.cate_two, null,ModuleName.PARTY_GROUP_TOPIC.getCode(), textList,
formDto.getImages(), entity.getId(),null,null, twoTypes,formDto.getMobile(),"0",deptDto);
contentSecurityFeign.insertRecords(record);
}
}
}catch (Exception e){
log.error(e.getMessage());
}
//内容审核 - 结束

Loading…
Cancel
Save