提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface NotifyTemplateVO { |
|
4 |
id?: number |
|
5 |
name: string |
|
6 |
nickname: string |
|
7 |
code: string |
|
8 |
content: string |
|
9 |
type?: number |
|
10 |
params: string |
|
11 |
status: number |
|
12 |
remark: string |
|
13 |
} |
|
14 |
|
|
15 |
export interface NotifySendReqVO { |
|
16 |
userId: number | null |
|
17 |
templateCode: string |
|
18 |
templateParams: Map<String, Object> |
|
19 |
} |
|
20 |
|
|
21 |
// 查询站内信模板列表 |
|
22 |
export const getNotifyTemplatePage = async (params: PageParam) => { |
|
23 |
return await request.get({ url: '/system/notify-template/page', params }) |
|
24 |
} |
|
25 |
|
|
26 |
// 查询站内信模板详情 |
|
27 |
export const getNotifyTemplate = async (id: number) => { |
|
28 |
return await request.get({ url: '/system/notify-template/get?id=' + id }) |
|
29 |
} |
|
30 |
|
|
31 |
// 新增站内信模板 |
|
32 |
export const createNotifyTemplate = async (data: NotifyTemplateVO) => { |
|
33 |
return await request.post({ url: '/system/notify-template/create', data }) |
|
34 |
} |
|
35 |
|
|
36 |
// 修改站内信模板 |
|
37 |
export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { |
|
38 |
return await request.put({ url: '/system/notify-template/update', data }) |
|
39 |
} |
|
40 |
|
|
41 |
// 删除站内信模板 |
|
42 |
export const deleteNotifyTemplate = async (id: number) => { |
|
43 |
return await request.delete({ url: '/system/notify-template/delete?id=' + id }) |
|
44 |
} |
|
45 |
|
|
46 |
// 发送站内信 |
|
47 |
export const sendNotify = (data: NotifySendReqVO) => { |
|
48 |
return request.post({ url: '/system/notify-template/send-notify', data }) |
|
49 |
} |