From 2b8f88856e90e530ddbfce88aea107a0ec894d5d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 29 七月 2026 13:51:19 +0800
Subject: [PATCH] refactor(storage): 优化附件关联逻辑并增加评标功能
---
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/storage/StorageAttachmentApiImpl.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/storage/StorageAttachmentApiImpl.java b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/storage/StorageAttachmentApiImpl.java
index 914c89d..919a93a 100644
--- a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/storage/StorageAttachmentApiImpl.java
+++ b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/api/storage/StorageAttachmentApiImpl.java
@@ -38,8 +38,24 @@
}
@Override
+ public void updateAttachments(String application, String recordType, Long recordId, List<Long> newBlobIds) {
+ if (newBlobIds == null) {
+ return;
+ }
+ if (newBlobIds.isEmpty()) {
+ // 娓呯┖鎵�鏈夐檮浠�
+ systemStorageAttachmentService.deleteAttachmentsByApplicationAndRecordTypeAndRecordId(
+ application != null ? application : "file", recordType, recordId);
+ return;
+ }
+ // 鍏ㄩ噺鏇挎崲锛歜indAttachments 鍐呴儴鍏堝垹鍚庢彃锛岀洿鎺ヤ紶鍏ュ叏閮ㄦ柊 blobId 鍗冲彲
+ bindAttachments(application, recordType, recordId, newBlobIds);
+ }
+
+ @Override
public List<StorageBlobRespDTO> listAttachments(String recordType, Long recordId) {
SystemStorageAttachmentListReqVO reqVO = new SystemStorageAttachmentListReqVO();
+ reqVO.setApplication("file");
reqVO.setRecordType(recordType);
reqVO.setRecordId(recordId);
List<SystemStorageBlobRespVO> list = systemStorageAttachmentService.listAttachments(reqVO);
--
Gitblit v1.9.3