From bc9002e5a890f328275b2e5ec725039db1b69fd1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 15 Dec 2020 15:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=87=E7=AD=BE=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6=E9=87=8C=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=AE=A2=E6=88=B7=E6=B2=A1=E6=9C=89=E4=B8=80?= =?UTF-8?q?=E5=A5=97=E8=87=AA=E5=B7=B1=E7=9A=84=E6=A0=87=E7=AD=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E4=B8=80=E5=A5=97=E6=95=B0=E6=8D=AE=E8=BF=9B=E5=8E=BB=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=94=BE=E5=85=A5=E7=BC=93=E5=AD=98=E3=80=82?= 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, 6 insertions(+) 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 23229851b2..e95f856aae 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 @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectTagDictDao; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; @@ -264,6 +265,11 @@ public class IssueProjectTagDictRedis { List db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + if(CollectionUtils.isEmpty(db) && (ifOtherOnly || CollectionUtils.isEmpty(category))){ + CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO(); customerIdParam.setCustomerId(customerId); + categoryDictService.init(customerIdParam); + db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + } // key -> redisKey // value -> [key : score ; value : object]