|
|
@ -269,26 +269,31 @@ public class IssueProjectTagDictRedis { |
|
|
|
CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO(); |
|
|
|
customerIdParam.setCustomerId(customerId); |
|
|
|
if (!CollectionUtils.isEmpty(redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)))){ |
|
|
|
//缓存不为空
|
|
|
|
if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME))) { |
|
|
|
if (ifOtherOnly || CollectionUtils.isEmpty(category)) { |
|
|
|
//补偿全部默认标签
|
|
|
|
categoryDictService.init(customerIdParam); |
|
|
|
db.addAll(poolDao.selectTagListByCustomer(customerId)); |
|
|
|
db.addAll(poolDao.selectTagByCategory(null, customerId, customerId)); |
|
|
|
} else { |
|
|
|
if (NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)) { |
|
|
|
categoryDictService.init(customerIdParam); |
|
|
|
} else { |
|
|
|
//只插入category中的标签
|
|
|
|
tagDictService.insertBatch(poolDao.selectTagByCategory(category, "default", customerId)); |
|
|
|
db.addAll(poolDao.selectTagsByCustomerIdAndTagIds(customerId, category)); |
|
|
|
List<IssueProjectTagDictEntity> missingTags = poolDao.selectTagByCategory(category, "default", customerId); |
|
|
|
if(!CollectionUtils.isEmpty(missingTags)){ |
|
|
|
tagDictService.insertBatch(missingTags); |
|
|
|
db.addAll(missingTags);} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
//缓存为空
|
|
|
|
if (NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)) { |
|
|
|
categoryDictService.init(customerIdParam); |
|
|
|
} |
|
|
|
db.addAll(poolDao.selectTagListByCustomer(customerId)); |
|
|
|
db.addAll(poolDao.selectTagByCategory(null, customerId, customerId)); |
|
|
|
} |
|
|
|
|
|
|
|
if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))){ |
|
|
|