package cn.iocoder.yudao.module.system.api.storage;
|
|
import cn.iocoder.yudao.module.system.api.storage.dto.StorageBlobRespDTO;
|
|
import java.util.List;
|
|
public interface StorageAttachmentApi {
|
|
void bindAttachments(String application, String recordType, Long recordId, List<Long> blobIds);
|
|
/**
|
* 增量更新附件关联:
|
* - 查询现有附件,对比新旧 blobId,只删除多余、只绑定新增
|
* - 如果新旧一致,不做任何操作
|
*
|
* @param application 应用用途
|
* @param recordType 业务记录类型
|
* @param recordId 业务记录 ID
|
* @param newBlobIds 新的 blobId 列表(为 null 时跳过,不做任何操作)
|
*/
|
void updateAttachments(String application, String recordType, Long recordId, List<Long> newBlobIds);
|
|
List<StorageBlobRespDTO> listAttachments(String recordType, Long recordId);
|
|
void deleteAttachments(List<Long> attachmentIds);
|
|
void deleteAttachmentsByRecord(String recordType, Long recordId);
|
|
}
|