// 消息模块

// 获取公告列表
export const getNoticeList = {
  url: '/notice/noticePermission/list',
  method: 'GET',
  dealReqData: ({ content, pageNum, pageSize }) => {
    return { content, pageNum, pageSize }
  }
}

// 新增公告
export const addNotice = {
  url: '/notice/noticeCreatePermission/save',
  method: 'POST',
  dealReqData: ({ content, title, startTime, endTime }) => {
    return { content, title, startTime, endTime }
  }
}

// 更新公告
export const updateNotice = {
  url: '/notice/noticePermission/update',
  method: 'PUT',
  dealReqData: (form) => {
    return form
  }
}

// 公告详情
export const detailNotice = {
  url: '/notice/noticePermission',
  method: 'GET',
  dealUrl: (url, noticeId) => {
    return `${url}/${noticeId}`
  }
}

// 删除公告
export const deleteNotice = {
  url: '/notice/noticePermission/delete',
  method: 'DELETE',
  dealUrl: (url, noticeId) => {
    return `${url}/${noticeId}`
  }
}

// 短信模板列表查询

export const getSmsTemplateList = {
  url: '/smsTemplate/page',
  method: 'GET',
  dealReqData: ({ pageNum, pageSize, templateCode, templateName }) => {
    return { pageNum, pageSize, templateCode, templateName }
  }
}
// 新增模板
export const smsTemplateAdd = {
  url: '/smsTemplate/add',
  method: 'POST'
}

export const deleteSmsTemplate = {
  url: '/smsTemplate/delete',
  method: 'DELETE'
}
export const updateSmsTemplate = {
  url: '/smsTemplate/modify',
  method: 'POST'
}

// 获取sms列表
export const getSmsList = {
  url: '/smsList/page',
  method: 'GET'
}

// 发送sms消息
export const sendSmsNow = {
  url: '/smsList/sendNow',
  method: 'POST'
}

// 重新发送sms
export const reSendSms = {
  url: '/smsList/reSend',
  method: 'GET'
}

// 删除sms
export const deleteSms = {
  url: '/smsList/delete',
  method: 'DELETE'
}
