private void checkRelationTaskList(List<DeliveryTaskDO> taskList) { if (CollectionUtils.isNotEmpty(taskList)) { List<String> errorList = taskList.stream() .map(deliveryTaskDO -> String.format("%s(%s)", deliveryTaskDO.getTaskName(), deliveryTaskDO.getId())) .collect(Collectors.toList()); String errorMessage = String.format("投放任务有引用,无法删除:%s", Joiner.on(", ").join(errorList)); throw new IllegalArgumentException(errorMessage); } }