chenhj
10 小时以前 f3a2e64d96e59bed492bb3eec8705a5f9ca269d7
src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java
@@ -43,11 +43,11 @@
    private MinioUtils minioUtils;
    @Override
    public List<StorageAttachment> selectStorageAttachments(Long recordId, StorageAttachmentRecordType recordType, StorageAttachmentConstants fileType) {
    public List<StorageAttachment> selectStorageAttachments(Long recordId, StorageAttachmentRecordType recordType, String fileType) {
        List<StorageAttachment> storageAttachments = storageAttachmentMapper.selectList(new LambdaQueryWrapper<StorageAttachment>()
                .eq(StorageAttachment::getRecordId, recordId)
                .eq(StorageAttachment::getRecordType, recordType.ordinal())
                .eq(StorageAttachment::getName, fileType.toString()));
                .eq(StorageAttachment::getName, fileType));
        if (storageAttachments != null) {
            for (StorageAttachment storageAttachment : storageAttachments) {
                StorageBlob storageBlob = storageBlobMapper.selectById(storageAttachment.getStorageBlobId());
@@ -80,7 +80,7 @@
    @Override
    public void saveStorageAttachment(List<StorageAttachment> attachments, Long recordId, StorageAttachmentRecordType recordType, String fileType) {
        // 删除旧图
        deleteStorageAttachment(new StorageAttachment(fileType, (long) recordType.ordinal(), recordId));
//        deleteStorageAttachment(new StorageAttachment(fileType, (long) recordType.ordinal(), recordId));
        for (StorageAttachment attachment : attachments) {
            // 获取关联记录
            StorageBlob storageBlob = attachment.getStorageBlobDTO();