diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 769ace3cab..83801407f0 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -29,6 +29,11 @@ public interface StrConstant { */ String HYPHEN = "-"; + /** + * 短下划线符号 + */ + String UNDER_LINE = "_"; + /** * 英文逗号 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index d93553ee41..4a5424c8af 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -176,6 +176,12 @@ public interface ArticleService extends BaseService { */ SyncScanResult scanContent(TokenDto tokenDto, String draftId); + /** + * desc:审核通过后 发表文章 + * @param tokenDto + * @param draftId + * @param syncScanResult + */ void scanAllPassPublishArticle(TokenDto tokenDto, String draftId, SyncScanResult syncScanResult); /** diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 8d3e69c3cd..79da360947 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -22,6 +22,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -65,6 +66,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import javax.swing.text.StringContent; import java.util.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; @@ -868,8 +870,6 @@ public class ArticleServiceImpl extends BaseServiceImpl NumConstant.ZERO){ draftContents.forEach(content -> { - //content.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS); - content.setOrderNum(content.getOrderNum()); ArticleContentEntity contentToInsert = ConvertUtils.sourceToTarget(content,ArticleContentEntity.class); contentToInsert.setArticleId(article.getId()); contentToInsert.setId(null); articleContentDao.insert(contentToInsert); - - //draftContentDao.updateById(content); }); } if(null != draftPublishRange && draftPublishRange.size() > NumConstant.ZERO){ @@ -905,14 +901,10 @@ public class ArticleServiceImpl extends BaseServiceImpl { String contentType = content.getContentType(); if (DraftConstant.TEXT.equals(contentType)) { - //todo 内容叠加审核吧 id拼起来 TextTaskDTO textTaskDTO = new TextTaskDTO(); textTaskDTO.setDataId(content.getId()); textTaskDTO.setContent(content.getContent()); @@ -1036,7 +1027,7 @@ public class ArticleServiceImpl extends BaseServiceImpl failDataIds = syncScanResult.getFailDataIds(); for(String id:failDataIds) { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { - draftCoverDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_FAIL); + draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE),""), ModuleConstant.AUDIT_STATUS_FAIL); coverFail = true; } else { draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_FAIL); @@ -1084,7 +1080,7 @@ public class ArticleServiceImpl extends BaseServiceImpl successDataIds = syncScanResult.getSuccessDataIds(); successDataIds.forEach(id -> { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { - draftCoverDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_PASS); + draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE),""), ModuleConstant.AUDIT_STATUS_PASS); } else { draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_PASS); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml index a658472bbc..ffd2aa3488 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftCoverDao.xml @@ -28,7 +28,7 @@ UPDATE DRAFT_COVER SET AUDIT_STATUS = #{auditStatus,jdbcType=VARCHAR} WHERE ID = #{id,jdbcType=VARCHAR} - DELETE FROM draft_content WHERE DRAFT_ID = #{draftId,jdbcType=VARCHAR} + DELETE FROM DRAFT_COVER WHERE DRAFT_ID = #{draftId,jdbcType=VARCHAR} \ No newline at end of file