Browse Source

缓存修改

dev_shibei_match
zxc 5 years ago
parent
commit
0d8bea8fd4
  1. 30
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

30
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -415,7 +415,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
if (!CollectionUtils.isEmpty(gridList)&&!CollectionUtils.isEmpty(gridIdList)) { if (!CollectionUtils.isEmpty(gridList)&&!CollectionUtils.isEmpty(gridIdList)) {
gridList.forEach(grid -> { gridList.forEach(grid -> {
if (gridIdList.contains(grid.getGridId())) { if (gridIdList.contains(grid.getGridId())) {
String agencyGridName = articleGridResultDTO.getAgencyName().concat("_").concat(grid.getGridName()); String agencyGridName = articleGridResultDTO.getAgencyName().concat("-").concat(grid.getGridName());
agencyGridNameList.add(agencyGridName); agencyGridNameList.add(agencyGridName);
DraftPublishRangeEntity draftPublishRangeEntity = new DraftPublishRangeEntity(); DraftPublishRangeEntity draftPublishRangeEntity = new DraftPublishRangeEntity();
draftPublishRangeEntity.setCustomerId(tokenDto.getCustomerId()); draftPublishRangeEntity.setCustomerId(tokenDto.getCustomerId());
@ -1007,6 +1007,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
updateAuditStatusFailById(draftId, syncScanResult); updateAuditStatusFailById(draftId, syncScanResult);
this.publishDraftToArticle(draft); this.publishDraftToArticle(draft);
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId); UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId);
if (updateCustomerTagCacheDTO == null){
return;
}
List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO);
this.addArticleTags(updateCustomerTagCacheDTO, draftId, tokenDto); this.addArticleTags(updateCustomerTagCacheDTO, draftId, tokenDto);
@ -1091,16 +1094,21 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
String tags = draft.getTags(); String tags = draft.getTags();
String customerId = draft.getCustomerId(); String customerId = draft.getCustomerId();
String userId = tokenDto.getUserId(); String userId = tokenDto.getUserId();
List<String> tagsList = Arrays.asList(tags.split("\\|")); UpdateCustomerTagCacheDTO result = null;
List<UpdateTagUseCountsResultDTO> tagsInfo = new ArrayList<>(); if (StringUtils.isNotBlank(tags)){
//政府端的 标签使用次数 DB result = new UpdateCustomerTagCacheDTO();
tagsList.forEach(tag -> { List<String> tagsList = Arrays.asList(tags.split("\\|"));
UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId); List<UpdateTagUseCountsResultDTO> tagsInfo = new ArrayList<>();
tagsInfo.add(updateTagUseCount); //政府端的 标签使用次数 DB
}); tagsList.forEach(tag -> {
UpdateCustomerTagCacheDTO result = new UpdateCustomerTagCacheDTO(); UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId);
result.setCustomerId(customerId); tagsInfo.add(updateTagUseCount);
result.setTagsInfo(tagsInfo); });
result.setCustomerId(customerId);
result.setTagsInfo(tagsInfo);
}
return result; return result;
} }

Loading…
Cancel
Save