index.ts 1.5 KB

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