import request from '@/utils/request'

// 查询客户群发记录主列表
export function listGroupVoiceMsg(query) {
  return request({
    url: '/qw/groupVoiceMsg/list',
    method: 'get',
    params: query
  })
}
// 查询客户群发记录主列表
export function myList(query) {
  return request({
    url: '/qw/groupVoiceMsg/myList',
    method: 'get',
    params: query
  })
}

// 查询客户群发记录主详细
export function getGroupVoiceMsg(id) {
  return request({
    url: '/qw/groupVoiceMsg/' + id,
    method: 'get'
  })
}


// 新增客户群发记录主
export function addGroupVoiceMsg(data) {
  return request({
    url: '/qw/groupVoiceMsg',
    method: 'post',
    data: data
  })
}

/** 统计数据详情，已发送，未发送，已接收，未接收等 */
export function countGroupVoiceMsgUser(msgId){
  return request({
    url: '/qw/groupVoiceMsg/getCountGroupVoiceMsgUser/' + msgId,
    method: 'get'
  })
}


/** 统计数据详情，已发送群主，送达群聊，未发送群主，未送达群聊等 */
export function CountGroupVoiceMsgBaseUser(msgId){
  return request({
    url: '/qw/groupVoiceMsg/getCountGroupVoiceMsgBaseUser/' + msgId,
    method: 'get'
  })
}


/** 客户群发 发送/接收的数据详情 */
export function CountGroupVoiceMsgUserDetails(query){
  return request({
    url: '/qw/groupVoiceMsg/getCountGroupVoiceMsgUserDetails',
    method: 'get',
    params: query
  })
}

/** 提醒成员群发 */

export function remindGroupVoiceMsg(query){
  return request({
    url: '/qw/groupVoiceMsg/remindGroupVoiceMsg',
    method: 'get',
    params: query
  })
}

// 修改客户群发记录主
export function updateGroupVoiceMsg(data) {
  return request({
    url: '/qw/groupVoiceMsg',
    method: 'put',
    data: data
  })
}

// 删除客户群发记录主
export function delGroupVoiceMsg(id) {
  return request({
    url: '/qw/groupVoiceMsg/' + id,
    method: 'delete'
  })
}

// 导出客户群发记录主
export function exportGroupVoiceMsg(query) {
  return request({
    url: '/qw/groupVoiceMsg/export',
    method: 'get',
    params: query
  })
}
