feat: 消息中心-站内信管理
This commit is contained in:
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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user