10 小时以前 2b8f88856e90e530ddbfce88aea107a0ec894d5d
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;
        }
        // 全量替换:bindAttachments 内部先删后插,直接传入全部新 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);