private boolean isRelatedCreativeExist(List<Long> creativeIds) {
if (CollectionUtils.isEmpty(creativeIds)) {
return false;
}
return creativeRepository.findAllById(creativeIds).size() == new HashSet<>(creativeIds).size();
}
这个方法的返回值为什么不能用下面这个值代替:
return creativeIds.sized() == new HashSet<>(creativeIds).size();