diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 88c196a8d7..2b61958883 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -51,7 +51,7 @@ public interface IssueProjectTagDictDao extends BaseDao selectTagId(@Param("tags") List newTags, @Param("customerId")String customerId); + List selectTagId(@Param("list") List newTags); /** * 获取客户默认分类标签 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 1b7d4ed8b1..26ce23bd7a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -179,7 +179,10 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签 -1 - dictRedis.editTagUseCount(customerId,t.getCategoryId(),t,NumConstant.ONE_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(t.getTagName()); + issueCategoryTagResultDTO.setId(t.getId()); + dictRedis.editTagUseCount(customerId,t.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; issueProjectTagDictDao.updateTagsUseCount(tags,customerId,NumConstant.ONE_STR); @@ -189,14 +192,17 @@ public class IssueTagsServiceImpl extends BaseServiceImpl selectTags = form.getTagList(); - List newTags = issueProjectTagDictDao.selectTagId(selectTags, customerId); + List newTags = issueProjectTagDictDao.selectTagId(selectTags); IssueTagsDTO issueTagsDTO = baseDao.selectOneTagByIssueId(form.getIssueId()); if (!CollectionUtils.isEmpty(newTags)){ // 需要删除的标签 List delList = tags.stream().filter(tag -> !newTags.contains(tag)).collect(toList()); if (!CollectionUtils.isEmpty(delList)){ delList.forEach(d -> { - dictRedis.editTagUseCount(customerId,d.getCategoryId(),d,NumConstant.ONE_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(d.getTagName()); + issueCategoryTagResultDTO.setId(d.getId()); + dictRedis.editTagUseCount(customerId,d.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; issueProjectTagDictDao.updateTagsUseCount(delList,customerId,NumConstant.ONE_STR); @@ -206,7 +212,10 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签+1 - dictRedis.editTagUseCount(customerId,a.getCategoryId(),a,NumConstant.ZERO_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(a.getTagName()); + issueCategoryTagResultDTO.setId(a.getId()); + dictRedis.editTagUseCount(customerId,a.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ZERO_STR); }); // 数据库对应标签 议题使用次数 +1 issueProjectTagDictDao.updateTagsUseCount(addList,customerId,NumConstant.ZERO_STR); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 6815000576..60beccaa6e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -14,11 +14,9 @@ DEL_FLAG = 0 - AND CUSTOMER_ID = #{customerId} AND - CATEGORY_ID = #{t.id} - AND TAG_NAME = #{t.tagName} + id = #{t.id} @@ -32,7 +30,7 @@ FROM issue_project_tag_dict WHERE DEL_FLAG = 0 AND - + ID = #{t.id}