|
|
@ -415,7 +415,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
if (!CollectionUtils.isEmpty(gridList)&&!CollectionUtils.isEmpty(gridIdList)) { |
|
|
|
gridList.forEach(grid -> { |
|
|
|
if (gridIdList.contains(grid.getGridId())) { |
|
|
|
String agencyGridName = articleGridResultDTO.getAgencyName().concat("_").concat(grid.getGridName()); |
|
|
|
String agencyGridName = articleGridResultDTO.getAgencyName().concat("-").concat(grid.getGridName()); |
|
|
|
agencyGridNameList.add(agencyGridName); |
|
|
|
DraftPublishRangeEntity draftPublishRangeEntity = new DraftPublishRangeEntity(); |
|
|
|
draftPublishRangeEntity.setCustomerId(tokenDto.getCustomerId()); |
|
|
@ -843,7 +843,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
//直接查询改草稿的 封面及内容
|
|
|
|
List<DraftContentEntity> draftContents = draftContentDao.selectByDraftId(draftId,null); |
|
|
|
DraftCoverEntity draftCover = draftCoverDao.selectByDraftId(draftId,null); |
|
|
|
List<DraftPublishRangeDTO> draftPublishRange = draftPublishRangeDao.selectByDraftId(draftId); |
|
|
|
List<DraftPublishRangeEntity> draftPublishRange = draftPublishRangeDao.selectByDraftId(draftId); |
|
|
|
|
|
|
|
//3.生成文章以及相关记录
|
|
|
|
ArticleEntity article = ConvertUtils.sourceToTarget(draft,ArticleEntity.class); |
|
|
@ -865,10 +865,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
if(null != draftPublishRange && draftPublishRange.size() > NumConstant.ZERO){ |
|
|
|
draftPublishRange.forEach(range -> { |
|
|
|
range.setPublishStatus(DraftConstant.PUBLISHED); |
|
|
|
ArticlePublishRangeEntity rangeToInsert = ConvertUtils.sourceToTarget(range,ArticlePublishRangeEntity.class); |
|
|
|
rangeToInsert.setArticleId(article.getId()); |
|
|
|
rangeToInsert.setId(null); |
|
|
|
articlePublishRangeDao.insert(rangeToInsert); |
|
|
|
draftPublishRangeDao.updateById(range); |
|
|
|
}); |
|
|
|
if(null != draftCover){ |
|
|
|
//draftCover.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS);
|
|
|
@ -1005,6 +1007,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
updateAuditStatusFailById(draftId, syncScanResult); |
|
|
|
this.publishDraftToArticle(draft); |
|
|
|
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId); |
|
|
|
if (updateCustomerTagCacheDTO == null){ |
|
|
|
return; |
|
|
|
} |
|
|
|
List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); |
|
|
|
this.addArticleTags(updateCustomerTagCacheDTO, draftId, tokenDto); |
|
|
|
|
|
|
@ -1089,6 +1094,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
String tags = draft.getTags(); |
|
|
|
String customerId = draft.getCustomerId(); |
|
|
|
String userId = tokenDto.getUserId(); |
|
|
|
UpdateCustomerTagCacheDTO result = null; |
|
|
|
if (StringUtils.isNotBlank(tags)){ |
|
|
|
result = new UpdateCustomerTagCacheDTO(); |
|
|
|
List<String> tagsList = Arrays.asList(tags.split("\\|")); |
|
|
|
List<UpdateTagUseCountsResultDTO> tagsInfo = new ArrayList<>(); |
|
|
|
//政府端的 标签使用次数 DB
|
|
|
@ -1096,9 +1104,11 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId); |
|
|
|
tagsInfo.add(updateTagUseCount); |
|
|
|
}); |
|
|
|
UpdateCustomerTagCacheDTO result = new UpdateCustomerTagCacheDTO(); |
|
|
|
result.setCustomerId(customerId); |
|
|
|
result.setTagsInfo(tagsInfo); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|