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)) {
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());
@ -1007,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);
@ -1091,16 +1094,21 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
String tags = draft.getTags();
String customerId = draft.getCustomerId();
String userId = tokenDto.getUserId();
List<String> tagsList = Arrays.asList(tags.split("\\|"));
List<UpdateTagUseCountsResultDTO> tagsInfo = new ArrayList<>();
//政府端的 标签使用次数 DB
tagsList.forEach(tag -> {
UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId);
tagsInfo.add(updateTagUseCount);
});
UpdateCustomerTagCacheDTO result = new UpdateCustomerTagCacheDTO();
result.setCustomerId(customerId);
result.setTagsInfo(tagsInfo);
UpdateCustomerTagCacheDTO result = null;
if (StringUtils.isNotBlank(tags)){
result = new UpdateCustomerTagCacheDTO();
List<String> tagsList = Arrays.asList(tags.split("\\|"));
List<UpdateTagUseCountsResultDTO> tagsInfo = new ArrayList<>();
//政府端的 标签使用次数 DB
tagsList.forEach(tag -> {
UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId);
tagsInfo.add(updateTagUseCount);
});
result.setCustomerId(customerId);
result.setTagsInfo(tagsInfo);
}
return result;
}

Loading…
Cancel
Save