feat: 消息中心-站内信管理
This commit is contained in:
27
src/services/system/log/login.ts
Normal file
27
src/services/system/log/login.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface LoginLogVO {
|
||||
id: number;
|
||||
logType: number;
|
||||
traceId: number;
|
||||
userId: number;
|
||||
userType: number;
|
||||
username: string;
|
||||
result: number;
|
||||
status: number;
|
||||
userIp: string;
|
||||
userAgent: string;
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
// 查询登录日志列表
|
||||
export async function getLoginLogPage(params: PageParam) {
|
||||
return request("/system/login-log/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// // 导出登录日志
|
||||
// export const exportLoginLog = (params) => {
|
||||
// return request.download({ url: '/system/login-log/export', params })
|
||||
// }
|
||||
@@ -20,11 +20,6 @@ export type OperateLogVO = {
|
||||
createTime: Date;
|
||||
};
|
||||
|
||||
// 查询操作日志列表
|
||||
// export const getOperateLogPage = (params: PageParam) => {
|
||||
// return request.get({ url: '/system/operate-log/page', params })
|
||||
// }
|
||||
|
||||
export async function getOperateLogPage(params: PageParam) {
|
||||
return request("/system/operate-log/page", {
|
||||
method: "GET",
|
||||
|
||||
72
src/services/system/message/mail/account.tsx
Normal file
72
src/services/system/message/mail/account.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface MailAccountVO {
|
||||
id: number;
|
||||
mail: string;
|
||||
username: string;
|
||||
password: string;
|
||||
host: string;
|
||||
port: number;
|
||||
sslEnable: boolean;
|
||||
starttlsEnable: boolean;
|
||||
}
|
||||
|
||||
// 查询邮箱账号列表
|
||||
// export const getMailAccountPage = async (params: PageParam) => {
|
||||
// return await request.get({ url: '/system/mail-account/page', params })
|
||||
// }
|
||||
export async function getMailAccountPage(params: PageParam) {
|
||||
return request("/system/mail-account/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询邮箱账号详情
|
||||
// export const getMailAccount = async (id: number) => {
|
||||
// return await request.get({ url: '/system/mail-account/get?id=' + id })
|
||||
// }
|
||||
export async function getMailAccount(id: number) {
|
||||
return request("/system/mail-account/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增邮箱账号
|
||||
// export const createMailAccount = async (data: MailAccountVO) => {
|
||||
// return await request.post({ url: "/system/mail-account/create", data });
|
||||
// };
|
||||
export async function createMailAccount(data: MailAccountVO) {
|
||||
return request("/system/mail-account/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改邮箱账号
|
||||
// export const updateMailAccount = async (data: MailAccountVO) => {
|
||||
// return await request.put({ url: "/system/mail-account/update", data });
|
||||
// };
|
||||
export async function updateMailAccount(data: MailAccountVO) {
|
||||
return request("/system/mail-account/update", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除邮箱账号
|
||||
// export const deleteMailAccount = async (id: number) => {
|
||||
// return await request.delete({ url: "/system/mail-account/delete?id=" + id });
|
||||
// };
|
||||
export async function deleteMailAccount(id: number) {
|
||||
return request("/system/mail-account/delete", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 获得邮箱账号精简列表
|
||||
// export const getSimpleMailAccountList = async () => {
|
||||
// return request.get({ url: '/system/mail-account/simple-list' })
|
||||
// }
|
||||
export async function getSimpleMailAccountList() {
|
||||
return request("/system/mail-account/simple-list", {
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
41
src/services/system/message/mail/log.tsx
Normal file
41
src/services/system/message/mail/log.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface MailLogVO {
|
||||
id: number;
|
||||
userId: number;
|
||||
userType: number;
|
||||
toMail: string;
|
||||
accountId: number;
|
||||
fromMail: string;
|
||||
templateId: number;
|
||||
templateCode: string;
|
||||
templateNickname: string;
|
||||
templateTitle: string;
|
||||
templateContent: string;
|
||||
templateParams: string;
|
||||
sendStatus: number;
|
||||
sendTime: Date;
|
||||
sendMessageId: string;
|
||||
sendException: string;
|
||||
}
|
||||
|
||||
// 查询邮件日志列表
|
||||
// export const getMailLogPage = async (params: PageParam) => {
|
||||
// return await request.get({ url: '/system/mail-log/page', params })
|
||||
// }
|
||||
export async function getMailLogPage(params: PageParam) {
|
||||
return request("/system/mail-log/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询邮件日志详情
|
||||
// export const getMailLog = async (id: number) => {
|
||||
// return await request.get({ url: '/system/mail-log/get?id=' + id })
|
||||
// }
|
||||
export async function getMailLog(id: number) {
|
||||
return request("/system/mail-log/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
81
src/services/system/message/mail/template.tsx
Normal file
81
src/services/system/message/mail/template.tsx
Normal file
@@ -0,0 +1,81 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface MailTemplateVO {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
accountId: number;
|
||||
nickname: string;
|
||||
title: string;
|
||||
content: string;
|
||||
params: string;
|
||||
status: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface MailSendReqVO {
|
||||
mail: string;
|
||||
templateCode: string;
|
||||
templateParams: Map<String, Object>;
|
||||
}
|
||||
|
||||
// 查询邮件模版列表
|
||||
// export const getMailTemplatePage = async (params: PageParam) => {
|
||||
// return await request.get({ url: '/system/mail-template/page', params })
|
||||
// }
|
||||
export async function getMailTemplatePage(params: PageParam) {
|
||||
return request("/system/mail-template/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询邮件模版详情
|
||||
// export const getMailTemplate = async (id: number) => {
|
||||
// return await request.get({ url: '/system/mail-template/get?id=' + id })
|
||||
// }
|
||||
export async function getMailTemplate(id: number) {
|
||||
return request("/system/mail-template/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增邮件模版
|
||||
// export const createMailTemplate = async (data: MailTemplateVO) => {
|
||||
// return await request.post({ url: '/system/mail-template/create', data })
|
||||
// }
|
||||
export async function createMailTemplate(data: MailTemplateVO) {
|
||||
return request("/system/mail-template/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改邮件模版
|
||||
// export const updateMailTemplate = async (data: MailTemplateVO) => {
|
||||
// return await request.put({ url: '/system/mail-template/update', data })
|
||||
// }
|
||||
export async function updateMailTemplate(data: MailTemplateVO) {
|
||||
return request("/system/mail-template/update", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除邮件模版
|
||||
// export const deleteMailTemplate = async (id: number) => {
|
||||
// return await request.delete({ url: '/system/mail-template/delete?id=' + id })
|
||||
// }
|
||||
export async function deleteMailTemplate(id: number) {
|
||||
return request("/system/mail-template/delete", {
|
||||
method: "PUT",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 发送邮件
|
||||
// export const sendMail = (data: MailSendReqVO) => {
|
||||
// return request.post({ url: '/system/mail-template/send-mail', data })
|
||||
// }
|
||||
export async function sendMail(data: MailTemplateVO) {
|
||||
return request("/system/mail-template/send-mail", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
74
src/services/system/message/notice.tsx
Normal file
74
src/services/system/message/notice.tsx
Normal file
@@ -0,0 +1,74 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface NoticeVO {
|
||||
id: number;
|
||||
title: string;
|
||||
type: number;
|
||||
content: string;
|
||||
status: number;
|
||||
remark: string;
|
||||
creator: string;
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
// 查询公告列表
|
||||
// export const getNoticePage = (params: PageParam) => {
|
||||
// return request.get({ url: '/system/notice/page', params })
|
||||
// }
|
||||
export async function getNoticePage(params: PageParam) {
|
||||
return request("/system/notice/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询公告详情
|
||||
// export const getNotice = (id: number) => {
|
||||
// return request.get({ url: '/system/notice/get?id=' + id })
|
||||
// }
|
||||
export async function getNotice(id: number) {
|
||||
return request("/system/notice/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增公告
|
||||
// export const createNotice = (data: NoticeVO) => {
|
||||
// return request.post({ url: '/system/notice/create', data })
|
||||
// }
|
||||
export async function createNotice(data: NoticeVO) {
|
||||
return request("/system/notice/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改公告
|
||||
// export const updateNotice = (data: NoticeVO) => {
|
||||
// return request.put({ url: '/system/notice/update', data })
|
||||
// }
|
||||
export async function updateNotice(data: NoticeVO) {
|
||||
return request("/system/notice/update", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除公告
|
||||
// export const deleteNotice = (id: number) => {
|
||||
// return request.delete({ url: '/system/notice/delete?id=' + id })
|
||||
// }
|
||||
export async function deleteNotice(id: number) {
|
||||
return request("/system/notice/update", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 推送公告
|
||||
// export const pushNotice = (id: number) => {
|
||||
// return request.post({ url: '/system/notice/push?id=' + id })
|
||||
// }
|
||||
|
||||
export async function pushNotice(id: number) {
|
||||
return request("/system/notice/push", {
|
||||
method: "POST",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
76
src/services/system/message/notify/message.tsx
Normal file
76
src/services/system/message/notify/message.tsx
Normal file
@@ -0,0 +1,76 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface NotifyMessageVO {
|
||||
id: number;
|
||||
userId: number;
|
||||
userType: number;
|
||||
templateId: number;
|
||||
templateCode: string;
|
||||
templateNickname: string;
|
||||
templateContent: string;
|
||||
templateType: number;
|
||||
templateParams: string;
|
||||
readStatus: boolean;
|
||||
readTime: Date;
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
// 查询站内信消息列表
|
||||
// export const getNotifyMessagePage = async (params: PageParam) => {
|
||||
// return await request.get({ url: '/system/notify-message/page', params })
|
||||
// }
|
||||
export async function getNotifyMessagePage(params: PageParam) {
|
||||
return request("/system/notify-message/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 获得我的站内信分页
|
||||
// export const getMyNotifyMessagePage = async (params: PageParam) => {
|
||||
// return await request.get({ url: '/system/notify-message/my-page', params })
|
||||
// }
|
||||
export async function getMyNotifyMessagePage(params: PageParam) {
|
||||
return request("/system/notify-message/my-page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 批量标记已读
|
||||
// export const updateNotifyMessageRead = async (ids) => {
|
||||
// return await request.put({
|
||||
// url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false })
|
||||
// })
|
||||
// }
|
||||
export async function updateNotifyMessageRead(ids: number[]) {
|
||||
return request("/system/notice/update", {
|
||||
method: "PUT",
|
||||
params: { ids: ids },
|
||||
});
|
||||
}
|
||||
// 标记所有站内信为已读
|
||||
// export const updateAllNotifyMessageRead = async () => {
|
||||
// return await request.put({ url: '/system/notify-message/update-all-read' })
|
||||
// }
|
||||
export async function updateAllNotifyMessageRead() {
|
||||
return request("/system/notify-message/update-all-read", {
|
||||
method: "PUT",
|
||||
});
|
||||
}
|
||||
// 获取当前用户的最新站内信列表
|
||||
// export const getUnreadNotifyMessageList = async () => {
|
||||
// return await request.get({ url: '/system/notify-message/get-unread-list' })
|
||||
// }
|
||||
export async function getUnreadNotifyMessageList() {
|
||||
return request("/system/notify-message/get-unread-list", {
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
// 获得当前用户的未读站内信数量
|
||||
// export const getUnreadNotifyMessageCount = async () => {
|
||||
// return await request.get({ url: '/system/notify-message/get-unread-count' })
|
||||
// }
|
||||
export async function getUnreadNotifyMessageCount() {
|
||||
return request("/system/notify-message/get-unread-count", {
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
80
src/services/system/message/notify/template.tsx
Normal file
80
src/services/system/message/notify/template.tsx
Normal file
@@ -0,0 +1,80 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface NotifyTemplateVO {
|
||||
id: number;
|
||||
name: string;
|
||||
nickname: string;
|
||||
code: string;
|
||||
content: string;
|
||||
type?: number;
|
||||
params: string;
|
||||
status: number;
|
||||
remark: string;
|
||||
mobile: string;
|
||||
createTime: Date;
|
||||
userType: number;
|
||||
userId: number | null;
|
||||
templateCode: string;
|
||||
templateParams: Map<String, Object>;
|
||||
}
|
||||
|
||||
// 查询站内信模板列表
|
||||
// export const getNotifyTemplatePage = async (params: PageParam) => {
|
||||
// return await request.get({ url: 'getNotifyTemplatePage', params })
|
||||
// }
|
||||
export async function getNotifyTemplatePage(params: PageParam) {
|
||||
return request("/system/notify-template/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询站内信模板详情
|
||||
// export const getNotifyTemplate = async (id: number) => {
|
||||
// return await request.get({ url: '/system/notify-template/get?id=' + id })
|
||||
// }
|
||||
export async function getNotifyTemplate(id: number) {
|
||||
return request("/system/notify-template/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增站内信模板
|
||||
// export const createNotifyTemplate = async (data: NotifyTemplateVO) => {
|
||||
// return await request.post({ url: '/system/notify-template/create', data })
|
||||
// }
|
||||
export async function createNotifyTemplate(data: NotifyTemplateVO) {
|
||||
return request("/system/notify-template/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改站内信模板
|
||||
// export const updateNotifyTemplate = async (data: NotifyTemplateVO) => {
|
||||
// return await request.put({ url: '/system/notify-template/update', data })
|
||||
// }
|
||||
export async function updateNotifyTemplate(data: NotifyTemplateVO) {
|
||||
return request("/system/notify-template/update", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除站内信模板
|
||||
// export const deleteNotifyTemplate = async (id: number) => {
|
||||
// return await request.delete({ url: '/system/notify-template/delete?id=' + id })
|
||||
// }
|
||||
export async function deleteNotifyTemplate(id: number) {
|
||||
return request("/system/notify-template/delete", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 发送站内信
|
||||
// export const sendNotify = (data: NotifySendReqVO) => {
|
||||
// return request.post({ url: '/system/notify-template/send-notify', data })
|
||||
// }
|
||||
export async function sendNotify(data: NotifyTemplateVO) {
|
||||
return request("/system/notify-template/send-notify", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
73
src/services/system/message/sms/channel.tsx
Normal file
73
src/services/system/message/sms/channel.tsx
Normal file
@@ -0,0 +1,73 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface SmsChannelVO {
|
||||
id: number;
|
||||
code: string;
|
||||
status: number;
|
||||
signature: string;
|
||||
remark: string;
|
||||
apiKey: string;
|
||||
apiSecret: string;
|
||||
callbackUrl: string;
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
// 查询短信渠道列表
|
||||
// export const getSmsChannelPage = (params: PageParam) => {
|
||||
// return request.get({ url: '/system/sms-channel/page', params })
|
||||
// }
|
||||
export async function getSmsChannelPage(params: PageParam) {
|
||||
return request("/system/sms-channel/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 获得短信渠道精简列表
|
||||
// export function getSimpleSmsChannelList() {
|
||||
// return request.get({ url: '/system/sms-channel/simple-list' })
|
||||
// }
|
||||
export async function getSimpleSmsChannelList() {
|
||||
return request("/system/sms-channel/simple-list", {
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
// 查询短信渠道详情
|
||||
// export const getSmsChannel = (id: number) => {
|
||||
// return request.get({ url: '/system/sms-channel/get?id=' + id })
|
||||
// }
|
||||
export async function getSmsChannel(id: number) {
|
||||
return request("/system/sms-channel/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增短信渠道
|
||||
// export const createSmsChannel = (data: SmsChannelVO) => {
|
||||
// return request.post({ url: '/system/sms-channel/create', data })
|
||||
// }
|
||||
export async function createSmsChannel(data: SmsChannelVO) {
|
||||
return request("/system/sms-channel/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改短信渠道
|
||||
// export const updateSmsChannel = (data: SmsChannelVO) => {
|
||||
// return request.put({ url: '/system/sms-channel/update', data })
|
||||
// }
|
||||
export async function updateSmsChannel(data: SmsChannelVO) {
|
||||
return request("/system/sms-channel/create", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除短信渠道
|
||||
// export const deleteSmsChannel = (id: number) => {
|
||||
// return request.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
// }
|
||||
export async function deleteSmsChannel(id: number) {
|
||||
return request("/system/sms-channel/create", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
40
src/services/system/message/sms/log.tsx
Normal file
40
src/services/system/message/sms/log.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface SmsLogVO {
|
||||
id: number | null;
|
||||
channelId: number | null;
|
||||
channelCode: string;
|
||||
templateId: number | null;
|
||||
templateCode: string;
|
||||
templateType: number | null;
|
||||
templateContent: string;
|
||||
templateParams: Map<string, object> | null;
|
||||
apiTemplateId: string;
|
||||
mobile: string;
|
||||
userId: number | null;
|
||||
userType: number | null;
|
||||
sendStatus: number | null;
|
||||
sendTime: Date | null;
|
||||
apiSendCode: string;
|
||||
apiSendMsg: string;
|
||||
apiRequestId: string;
|
||||
apiSerialNo: string;
|
||||
receiveStatus: number | null;
|
||||
receiveTime: Date | null;
|
||||
apiReceiveCode: string;
|
||||
apiReceiveMsg: string;
|
||||
createTime: Date | null;
|
||||
}
|
||||
|
||||
// 查询短信日志列表
|
||||
|
||||
export async function getSmsLogPage(params: PageParam) {
|
||||
return request("/system/sms-channel/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 导出短信日志
|
||||
// export const exportSmsLog = (params) => {
|
||||
// return request.download({ url: '/system/sms-log/export-excel', params })
|
||||
// }
|
||||
92
src/services/system/message/sms/template.tsx
Normal file
92
src/services/system/message/sms/template.tsx
Normal file
@@ -0,0 +1,92 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface SmsTemplateVO {
|
||||
id?: number;
|
||||
type?: number;
|
||||
status: number;
|
||||
code: string;
|
||||
name: string;
|
||||
content: string;
|
||||
remark: string;
|
||||
apiTemplateId: string;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
params?: string[];
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
export interface SendSmsReqVO {
|
||||
mobile: string;
|
||||
templateCode: string;
|
||||
templateParams: Map<String, Object>;
|
||||
}
|
||||
|
||||
// 查询短信模板列表
|
||||
// export const getSmsTemplatePage = (params: PageParam) => {
|
||||
// return request.get({ url: '/system/sms-template/page', params })
|
||||
// }
|
||||
export async function getSmsTemplatePage(params: PageParam) {
|
||||
return request("/system/sms-template/page", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
}
|
||||
// 查询短信模板详情
|
||||
// export const getSmsTemplate = (id: number) => {
|
||||
// return request.get({ url: '/system/sms-template/get?id=' + id })
|
||||
// }
|
||||
export async function getSmsTemplate(id: number) {
|
||||
return request("/system/sms-template/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 新增短信模板
|
||||
// export const createSmsTemplate = (data: SmsTemplateVO) => {
|
||||
// return request.post({ url: '/system/sms-template/create', data })
|
||||
// }
|
||||
export async function createSmsTemplate(data: SmsTemplateVO) {
|
||||
return request("/system/sms-template/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 修改短信模板
|
||||
// export const updateSmsTemplate = (data: SmsTemplateVO) => {
|
||||
// return request.put({ url: '/system/sms-template/update', data })
|
||||
// }
|
||||
export async function updateSmsTemplate(data: SmsTemplateVO) {
|
||||
return request("/system/sms-template/update", {
|
||||
method: "PUT",
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除短信模板
|
||||
// export const deleteSmsTemplate = (id: number) => {
|
||||
// return request.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
// }
|
||||
export async function deleteSmsTemplate(id: number) {
|
||||
return request("/system/sms-template/update", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
// 导出短信模板
|
||||
// export const exportSmsTemplate = (params) => {
|
||||
// return request.download({
|
||||
// url: '/system/sms-template/export-excel',
|
||||
// params
|
||||
// })
|
||||
// }
|
||||
|
||||
// 发送短信
|
||||
// export const sendSms = (data: SendSmsReqVO) => {
|
||||
// return request.post({ url: '/system/sms-template/send-sms', data })
|
||||
// }
|
||||
|
||||
export async function sendSms(data: SmsTemplateVO) {
|
||||
return request("/system/sms-template/create", {
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user