private void saveBusinessId(String businessId, Set<String> ids) {
        List<Attachment> attachments = attachmentRepository.findAllById(ids);
        for (Attachment attachment : attachments) {
            attachment.setBusinessId(businessId);
        }
        attachmentRepository.saveAll(attachments);
    }
saveBusinessId

@param ids ids
@param businessId businessId
src/main/java/com/tuituidan/openhub/service/AttachmentService.java