import request from '@/utils/request'

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

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

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

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

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

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