Browse Source

Merge remote-tracking branch 'origin/dev_issue_category' into dev_issue_category

dev_shibei_match
sunyuchao 4 years ago
parent
commit
225f16c1e5
  1. 40
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

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

@ -266,22 +266,30 @@ public class IssueProjectTagDictRedis {
List<IssueProjectTagDictEntity> db = new LinkedList<>(); List<IssueProjectTagDictEntity> db = new LinkedList<>();
if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME))){ CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO();
CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO(); customerIdParam.setCustomerId(customerId); customerIdParam.setCustomerId(customerId);
if(ifOtherOnly || CollectionUtils.isEmpty(category)) { if (!CollectionUtils.isEmpty(redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)))){
//补偿全部默认标签 if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME))) {
categoryDictService.init(customerIdParam); if (ifOtherOnly || CollectionUtils.isEmpty(category)) {
db.addAll(poolDao.selectTagListByCustomer(customerId)); //补偿全部默认标签
}else{ categoryDictService.init(customerIdParam);
if(NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)){ db.addAll(poolDao.selectTagListByCustomer(customerId));
categoryDictService.init(customerIdParam); } else {
}else{ if (NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)) {
//只插入category中的标签 categoryDictService.init(customerIdParam);
tagDictService.insertBatch(poolDao.selectTagByCategory(category,"default",customerId)); } else {
db.addAll(poolDao.selectTagsByCustomerIdAndTagIds(customerId,category)); //只插入category中的标签
} tagDictService.insertBatch(poolDao.selectTagByCategory(category, "default", customerId));
} db.addAll(poolDao.selectTagsByCustomerIdAndTagIds(customerId, category));
} }
}
}
}else{
if (NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)) {
categoryDictService.init(customerIdParam);
}
db.addAll(poolDao.selectTagListByCustomer(customerId));
}
if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))){ if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))){
//先去数据库查询自定义,为空则是最终结果,不为空则补偿 //先去数据库查询自定义,为空则是最终结果,不为空则补偿

Loading…
Cancel
Save