zss
2026-04-24 876068589d213fa585cf593fa19b39f9592e47d5
src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java
@@ -8,9 +8,7 @@
import com.ruoyi.basic.service.StorageBlobService;
import com.ruoyi.common.constant.StorageAttachmentConstants;
import com.ruoyi.common.enums.StorageAttachmentRecordType;
import com.ruoyi.common.utils.MinioUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -26,38 +24,12 @@
@Service
@RequiredArgsConstructor
public class StorageAttachmentServiceImpl extends ServiceImpl<StorageAttachmentMapper, StorageAttachment> implements StorageAttachmentService {
    @Autowired
    private StorageBlobMapper storageBlobMapper;
    private final StorageBlobMapper storageBlobMapper;
    @Autowired
    private StorageAttachmentMapper storageAttachmentMapper;
    private final StorageAttachmentMapper storageAttachmentMapper;
    @Autowired
    private StorageBlobService storageBlobService;
    private final StorageBlobService storageBlobService;
    @Autowired
    private MinioUtils minioUtils;
    @Override
    public List<StorageAttachment> selectStorageAttachments(Long recordId, StorageAttachmentRecordType recordType, String fileType) {
        // todo fileChange
//        List<StorageAttachment> storageAttachments = storageAttachmentMapper.selectList(new LambdaQueryWrapper<StorageAttachment>()
//                .eq(StorageAttachment::getRecordId, recordId)
//                .eq(StorageAttachment::getRecordType, recordType.ordinal())
//                .eq(StorageAttachment::getName, fileType));
//        if (storageAttachments != null) {
//            for (StorageAttachment storageAttachment : storageAttachments) {
//                StorageBlob storageBlob = storageBlobMapper.selectById(storageAttachment.getStorageBlobId());
//                StorageBlobDTO storageBlobDTO = new StorageBlobDTO();
//                BeanUtils.copyProperties(storageBlob, storageBlobDTO);
//                storageBlobDTO.setUrl(minioUtils.getPreviewUrl(storageBlob.getBucketName(), storageBlob.getBucketName(), true));
//                storageAttachment.setStorageBlobDTO(storageBlobDTO);
//            }
//        }
//        return storageAttachments;
        return null;
    }
    @Override
    public void saveStorageAttachment(List<StorageAttachment> attachments, Long recordId, StorageAttachmentRecordType recordType, StorageAttachmentConstants fileType) {