Browse Source

查询标签时的补偿机制里,如果客户没有一套自己的标签数据,默认初始化一套数据进去,并放入缓存。

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

6
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<IssueProjectTagDictEntity> 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]

Loading…
Cancel
Save