diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java index 978a9ab394..494ec2c154 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java @@ -44,6 +44,8 @@ public interface TagConstant { String SUCCESS_UPDATE = "更新标签缓存成功... ..."; String FAILURE_UPDATE = "更新标签缓存失败... ..."; + String SELECT_GRIDIDLIST_FAILURE = "查询gridId集合数量为0"; + } 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 36f47c9fc0..5a2b58c338 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 @@ -890,7 +890,7 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsList = Arrays.asList(tags.split("\\|")); List tagsInfo = new ArrayList<>(); - //政府端的 标签使用次数 DB和redis更新(zSet) + //政府端的 标签使用次数 DB for (String tag : tagsList) { UpdateTagUseCountsResultDTO updateTagUseCount = tagCustomerService.checkTagInfo(tag, customerId, userId); tagsInfo.add(updateTagUseCount); @@ -915,7 +915,7 @@ public class ArticleServiceImpl extends BaseServiceImpl tagsInfo = formDto.getTagsInfo(); String userId = tokenDto.getUserId(); + //根据草稿id查询发布范围id集合 List gridIds = articlePublishRangeDao.selectGridIdByDraftId(draftId); + if (gridIds.size() == NumConstant.ZERO){ + throw new RenException(TagConstant.SELECT_GRIDIDLIST_FAILURE); + } List gridTags = new ArrayList<>(); List gridTagCache = new ArrayList<>(); for (String gridId : gridIds) { @@ -976,7 +980,7 @@ public class ArticleServiceImpl extends BaseServiceImpl resiTagList(ResiTagListFormDTO formDto) { - //校验 在本网格是否发布过文章 + //校验 客户在本网格是否发布过文章 Integer articleCounts = articleDao.checkPublishArticle(formDto); if (articleCounts== NumConstant.ZERO){ return new ArrayList<>(); diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index d1066b44f6..d3be4c7e2f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -34,16 +34,17 @@ ORDER BY ac.ORDER_NUM ASC + +