From bcbff529977768c5c80714f45d52b4f36629d236 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期一, 16 六月 2025 18:00:30 +0800 Subject: [PATCH] 1.生产加工 2.文件上传 --- ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java b/ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java index d4e87bf..c53480b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java +++ b/ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageAttachmentServiceImpl.java @@ -1,22 +1,20 @@ package com.ruoyi.basic.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.basic.entity.StorageAttachment; import com.ruoyi.basic.entity.StorageBlob; import com.ruoyi.basic.entity.dto.StorageBlobDTO; import com.ruoyi.basic.mapper.StorageAttachmentMapper; import com.ruoyi.basic.mapper.StorageBlobMapper; import com.ruoyi.basic.service.StorageAttachmentService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.basic.service.StorageBlobService; -import com.ruoyi.common.constant.StorageAttachmentConstants; import com.ruoyi.common.enums.StorageAttachmentRecordType; import com.ruoyi.common.utils.file.MinioUtils; -import io.minio.MinioClient; +import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import lombok.RequiredArgsConstructor; import java.util.List; @@ -44,7 +42,7 @@ 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()) @@ -63,9 +61,9 @@ } @Override - public void saveStorageAttachment(List<StorageAttachment> attachments, Long recordId, StorageAttachmentRecordType recordType, StorageAttachmentConstants fileType) { + public void saveStorageAttachment(List<StorageAttachment> attachments, Long recordId, StorageAttachmentRecordType recordType, String fileType) { // 鍒犻櫎鏃у浘 - deleteStorageAttachment(new StorageAttachment(fileType.toString(), (long) recordType.ordinal(), recordId)); + deleteStorageAttachment(new StorageAttachment(fileType.toString(), (long) recordType.ordinal(), recordId)); for (StorageAttachment attachment : attachments) { // 鑾峰彇鍏宠仈璁板綍 StorageBlob storageBlob = attachment.getStorageBlobDTO(); -- Gitblit v1.9.3