import request from '@/utils/request'

// 查询消息记录列表
export function listMsg(query) {
  return request({
    url: '/msg/msg/list',
    method: 'get',
    params: query
  })
}

// 查询消息记录详细
export function getMsg(msgId) {
  return request({
    url: '/msg/msg/' + msgId,
    method: 'get'
  })
}

// 新增消息记录
export function addMsg(data) {
  return request({
    url: '/msg/msg',
    method: 'post',
    data: data
  })
}

// 修改消息记录
export function updateMsg(data) {
  return request({
    url: '/msg/msg',
    method: 'put',
    data: data
  })
}

// 删除消息记录
export function delMsg(msgId) {
  return request({
    url: '/msg/msg/' + msgId,
    method: 'delete'
  })
}

// 导出消息记录
export function exportMsg(query) {
  return request({
    url: '/msg/msg/export',
    method: 'get',
    params: query
  })
}