import request from '@/utils/request'

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

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


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

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


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


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



/** 提醒成员群发 */

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

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

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

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