From 6c7d7240b7ad87f9845b97a0268ff8262584abe0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 15 Dec 2020 10:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=BC=93=E5=AD=98=E8=A1=A5?= =?UTF-8?q?=E5=81=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/redis/IssueProjectTagDictRedis.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 8494a00ec7..23229851b2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -26,6 +26,7 @@ import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; +import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.utils.ModuleConstants; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; @@ -39,7 +40,6 @@ import org.springframework.data.redis.core.ZSetOperations; import org.springframework.lang.Nullable; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import sun.security.krb5.internal.PAData; import java.util.*; import java.util.stream.Collectors; @@ -61,6 +61,8 @@ public class IssueProjectTagDictRedis { private IssueProjectTagDictDao poolDao; @Autowired private IssueProjectCategoryDictDao categoryDictDao; + @Autowired + private IssueProjectCategoryDictService categoryDictService; public void delete(Object[] ids) { } @@ -305,7 +307,7 @@ public class IssueProjectTagDictRedis { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); //自定义标签:按照热度排序 sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()) - result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName());return tag;}).collect(Collectors.toList())); return result;