You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5 KiB

3 months ago
import http from '@/api';
import { ADMIN_MODULE } from '@/api/helper/prefix';
import type { IPage } from '@/api/types';
import type {
SysTempFileQuery,
SysTempFileRow,
SysTempFileForm,
SysTempFileHistoryQuery,
SysTempFileHistory
} from '@/api/types/system/sysTempFile';
/**
*
* @param params
* @returns {*}
*/
export const getSysTempFileListApi = (params: SysTempFileQuery) => {
return http.get<IPage<SysTempFileRow>>(ADMIN_MODULE + `/sys-temp-file`, params);
};
/**
*
* @param params
* @returns {*}
*/
export const createSysTempFileApi = (params: SysTempFileForm) => {
return http.post(ADMIN_MODULE + `/sys-temp-file`, params);
};
/**
*
* @param params
* @returns {*}
*/
export const updateSysTempFileApi = (params: SysTempFileForm) => {
return http.put(ADMIN_MODULE + `/sys-temp-file`, params);
};
/**
*
* @param params
* @returns {*}
*/
export const removeSysTempFileApi = (params: { ids: (string | number)[] }) => {
return http.delete(ADMIN_MODULE + `/sys-temp-file`, params);
};
/**
*
* @param params
* @returns {*}
*/
export const getSysTempFileDetailApi = (params: { id: number }) => {
const { id } = params;
return http.get<SysTempFileRow>(ADMIN_MODULE + `/sys-temp-file/${id}`);
};
/**
*
* @param params
*/
export const getSysTempFileHistoryListApi = (params: SysTempFileHistoryQuery) => {
return http.get<IPage<SysTempFileHistory>>(ADMIN_MODULE + `/sys-temp-file-history/history`, params);
};