diff --git a/apps/web-antd/src/api/system/mail/account/index.ts b/apps/web-antd/src/api/system/mail/account/index.ts index 9ec32721d..aca87d9e8 100644 --- a/apps/web-antd/src/api/system/mail/account/index.ts +++ b/apps/web-antd/src/api/system/mail/account/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -20,10 +20,9 @@ export namespace SystemMailAccountApi { // 查询邮箱账号列表 export const getMailAccountPage = async (params: PageParam) => { - return await requestClient.get<{ - list: SystemMailAccountApi.MailAccountVO[]; - total: number; - }>('/system/mail-account/page', { params }); + return await requestClient.get< + PageResult + >('/system/mail-account/page', { params }); }; // 查询邮箱账号详情 diff --git a/apps/web-antd/src/api/system/mail/log/index.ts b/apps/web-antd/src/api/system/mail/log/index.ts index 651c90124..ed1285420 100644 --- a/apps/web-antd/src/api/system/mail/log/index.ts +++ b/apps/web-antd/src/api/system/mail/log/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -26,10 +26,10 @@ export namespace SystemMailLogApi { // 查询邮件日志列表 export const getMailLogPage = async (params: PageParam) => { - return await requestClient.get<{ - list: SystemMailLogApi.MailLogVO[]; - total: number; - }>('/system/mail-log/page', { params }); + return await requestClient.get>( + '/system/mail-log/page', + { params }, + ); }; // 查询邮件日志详情 diff --git a/apps/web-antd/src/api/system/mail/template/index.ts b/apps/web-antd/src/api/system/mail/template/index.ts index 70415679f..bf83cc3c5 100644 --- a/apps/web-antd/src/api/system/mail/template/index.ts +++ b/apps/web-antd/src/api/system/mail/template/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -26,10 +26,9 @@ export namespace SystemMailTemplateApi { // 查询邮件模版列表 export const getMailTemplatePage = async (params: PageParam) => { - return await requestClient.get<{ - list: SystemMailTemplateApi.MailTemplateVO[]; - total: number; - }>('/system/mail-template/page', { params }); + return await requestClient.get< + PageResult + >('/system/mail-template/page', { params }); }; // 查询邮件模版详情 diff --git a/apps/web-antd/src/api/system/sms/channel/index.ts b/apps/web-antd/src/api/system/sms/channel/index.ts index 2adbf30fd..9108eeffd 100644 --- a/apps/web-antd/src/api/system/sms/channel/index.ts +++ b/apps/web-antd/src/api/system/sms/channel/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -19,10 +19,10 @@ export namespace SystemSmsChannelApi { /** 查询短信渠道列表 */ export function getSmsChannelPage(params: PageParam) { - return requestClient.get<{ - list: SystemSmsChannelApi.SmsChannelVO[]; - total: number; - }>('/system/sms-channel/page', { params }); + return requestClient.get>( + '/system/sms-channel/page', + { params }, + ); } /** 获得短信渠道精简列表 */ diff --git a/apps/web-antd/src/api/system/sms/log/index.ts b/apps/web-antd/src/api/system/sms/log/index.ts index 4a2aac414..c7448ef82 100644 --- a/apps/web-antd/src/api/system/sms/log/index.ts +++ b/apps/web-antd/src/api/system/sms/log/index.ts @@ -1,42 +1,42 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; export namespace SystemSmsLogApi { /** 短信日志信息 */ export interface SmsLogVO { - id: null | number; - channelId: null | number; + id?: number; + channelId?: number; channelCode: string; - templateId: null | number; + templateId?: number; templateCode: string; - templateType: null | number; + templateType?: number; templateContent: string; - templateParams: null | Record; + templateParams?: Record; apiTemplateId: string; mobile: string; - userId: null | number; - userType: null | number; - sendStatus: null | number; - sendTime: Date | null; + userId?: number; + userType?: number; + sendStatus?: number; + sendTime?: Date; apiSendCode: string; apiSendMsg: string; apiRequestId: string; apiSerialNo: string; - receiveStatus: null | number; - receiveTime: Date | null; + receiveStatus?: number; + receiveTime?: Date; apiReceiveCode: string; apiReceiveMsg: string; - createTime: Date | null; + createTime?: Date; } } /** 查询短信日志列表 */ export function getSmsLogPage(params: PageParam) { - return requestClient.get<{ - list: SystemSmsLogApi.SmsLogVO[]; - total: number; - }>('/system/sms-log/page', { params }); + return requestClient.get>( + '/system/sms-log/page', + { params }, + ); } /** 导出短信日志 */ diff --git a/apps/web-antd/src/api/system/sms/template/index.ts b/apps/web-antd/src/api/system/sms/template/index.ts index 322a0002e..643197818 100644 --- a/apps/web-antd/src/api/system/sms/template/index.ts +++ b/apps/web-antd/src/api/system/sms/template/index.ts @@ -1,4 +1,4 @@ -import type { PageParam } from '@vben/request'; +import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; @@ -29,10 +29,10 @@ export namespace SystemSmsTemplateApi { /** 查询短信模板列表 */ export function getSmsTemplatePage(params: PageParam) { - return requestClient.get<{ - list: SystemSmsTemplateApi.SmsTemplateVO[]; - total: number; - }>('/system/sms-template/page', { params }); + return requestClient.get>( + '/system/sms-template/page', + { params }, + ); } /** 查询短信模板详情 */