59 lines
2.4 KiB
TypeScript
59 lines
2.4 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface BizMailAttachments extends BasicModel<BizMailAttachments> {
|
|
createTime?: string; // 记录时间
|
|
mailId: number; // 收件标识
|
|
messageId: string; // 消息标识
|
|
fileName: string; // 附件名称
|
|
fileSize: number; // 文件大小
|
|
fileType?: string; // 文件类型
|
|
fileExt?: string; // 文件扩展名
|
|
storagePath: string; // 存储路径
|
|
fileMd5?: string; // 文件MD5
|
|
downloadCount?: number; // 下载次数
|
|
isCompressed?: string; // 是否压缩
|
|
isEncrypted?: string; // 是否加密
|
|
}
|
|
|
|
export const bizMailAttachmentsList = (params?: BizMailAttachments | any) =>
|
|
defHttp.get<BizMailAttachments>({ url: adminPath + '/biz/mailAttachments/list', params });
|
|
|
|
export const bizMailAttachmentsListAll = (params?: BizMailAttachments | any) =>
|
|
defHttp.get<BizMailAttachments[]>({ url: adminPath + '/biz/mailAttachments/listAll', params });
|
|
|
|
export const bizMailAttachmentsListData = (params?: BizMailAttachments | any) =>
|
|
defHttp.post<Page<BizMailAttachments>>({ url: adminPath + '/biz/mailAttachments/listData', params });
|
|
|
|
export const bizMailAttachmentsForm = (params?: BizMailAttachments | any) =>
|
|
defHttp.get<BizMailAttachments>({ url: adminPath + '/biz/mailAttachments/form', params });
|
|
|
|
export const bizMailAttachmentsSave = (params?: any, data?: BizMailAttachments | any) =>
|
|
defHttp.postJson<BizMailAttachments>({ url: adminPath + '/biz/mailAttachments/save', params, data });
|
|
|
|
export const bizMailAttachmentsImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/mailAttachments/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizMailAttachmentsDelete = (params?: BizMailAttachments | any) =>
|
|
defHttp.get<BizMailAttachments>({ url: adminPath + '/biz/mailAttachments/delete', params });
|