import { downloadSecretKeyPath, findFilelistPath, findFilelistPathBySecond, getSnowIdPath, removeFilePath } from '@/utils/DownloadUtils'; import request from '@/utils/request'; /** * 获取密钥(用于下载附件) * @param {主键} fileId * @returns */ export async function getDownloadSecretKey({ fileId }: any) { return request(downloadSecretKeyPath, { method: 'GET', params: { fileId }, }); } /** * 获取雪花id * @returns */ export async function createNewFileBid() { return request(getSnowIdPath, { method: 'GET' }) } /** * 根据fileId删除文件 * @param {主键} fileId * @returns */ export async function removeFileByOid(fileId: string) { return request(removeFilePath, { method: 'POST', params: { fileId }, }) } /** * 根据objectIdList查询文件列表 * @param {业务id列表} objectIdList * @returns */ export async function getFilelist(objectIdList: string[]) { return request(findFilelistPath, { method: 'POST', data: [...objectIdList], }) } /** * 根据bid查询文件列表(2.0) * @param {业务id列表} id * @returns */ export async function getFilelistBySecond(id: string, p: string) { return fetch(findFilelistPathBySecond + '?id=' + id + '&p=' + p, { method: 'POST', }) }