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]