提交 | 用户 | 时间
|
314507
|
1 |
import request from '@/config/axios' |
H |
2 |
import qs from 'qs' |
|
3 |
|
|
4 |
export interface NotifyMessageVO { |
|
5 |
id: number |
|
6 |
userId: number |
|
7 |
userType: number |
|
8 |
templateId: number |
|
9 |
templateCode: string |
|
10 |
templateNickname: string |
|
11 |
templateContent: string |
|
12 |
templateType: number |
|
13 |
templateParams: string |
|
14 |
readStatus: boolean |
|
15 |
readTime: Date |
|
16 |
createTime: Date |
|
17 |
} |
|
18 |
|
|
19 |
// 查询站内信消息列表 |
|
20 |
export const getNotifyMessagePage = async (params: PageParam) => { |
|
21 |
return await request.get({ url: '/system/notify-message/page', params }) |
|
22 |
} |
|
23 |
|
|
24 |
// 获得我的站内信分页 |
|
25 |
export const getMyNotifyMessagePage = async (params: PageParam) => { |
|
26 |
return await request.get({ url: '/system/notify-message/my-page', params }) |
|
27 |
} |
|
28 |
|
|
29 |
// 批量标记已读 |
|
30 |
export const updateNotifyMessageRead = async (ids) => { |
|
31 |
return await request.put({ |
|
32 |
url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) |
|
33 |
}) |
|
34 |
} |
|
35 |
|
|
36 |
// 标记所有站内信为已读 |
|
37 |
export const updateAllNotifyMessageRead = async () => { |
|
38 |
return await request.put({ url: '/system/notify-message/update-all-read' }) |
|
39 |
} |
|
40 |
|
|
41 |
// 获取当前用户的最新站内信列表 |
|
42 |
export const getUnreadNotifyMessageList = async () => { |
|
43 |
return await request.get({ url: '/system/notify-message/get-unread-list' }) |
|
44 |
} |
|
45 |
|
|
46 |
// 获得当前用户的未读站内信数量 |
|
47 |
export const getUnreadNotifyMessageCount = async () => { |
|
48 |
return await request.get({ url: '/system/notify-message/get-unread-count' }) |
|
49 |
} |