Browse Source

查询标签缓存时对于特定场景强制报错

dev_shibei_match
wangchao 5 years ago
parent
commit
e9ab4e1c65
  1. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

@ -18,6 +18,7 @@
package com.epmet.redis;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.GovIssueRedisKeys;
@ -93,7 +94,7 @@ public class IssueProjectTagDictRedis {
public Map<String,List<IssueCategoryTagResultDTO>> getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(String customerId,List<String> category) {
if (StringUtils.isBlank(customerId)) {
log.error("customerId can not be null when obtain govern tags.");
return null;
throw new RenException("customerId can not be null when obtain govern tags.");
}
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
@ -139,7 +140,7 @@ public class IssueProjectTagDictRedis {
if (CollectionUtils.isEmpty(compensate)) {
log.error("compensation failure or there is no tag data in database!!");
return null;
throw new RenException("compensation failure or there is no tag data in database!!");
} else {
log.warn("compensation completed!!");
return compensate;

Loading…
Cancel
Save