import request from '@/utils/request'

// 查询我的客户
export function groupList(query) {
    return request({
      url: '/system/group/groupList',
      method: 'get',
      params: query
    })
  }

// 根据groupid导出
export function exportData(query) {
  return request({
    url: '/system/group/exportData',
    method: 'POST',
    params: query,
    responseType: 'blob'
  })
}

//根据指定ID导出
export function exportDataByCustIds(query) {
  return request({
    url: '/system/group/exportDataByCustIds',
    method: 'POST',
    params: query,
    responseType: 'blob'
  })
}

//删除
export function DeleteGroupByGroupId(id) {
  return request({
    url: `/system/group/DeleteGroupByGroupId?groupId=${id}`,
    method: 'get',

  })
}

// 获取已有任务
export function getCurrentExistTask(query) {
  return request({
    url: `/system/campaign/listCampaign`,
    method: 'get',
    params: query,
  })
}

// 添加到已有任务
export function addToCurrentExistTask(data) {
  return request({
    url: `/system/group/createTask`,
    method: 'post',
    data: data,
  })
}

// 修改备注
export function systemRecordEditLable(data) {
  return request({
    url: `/system/record/editLable`,
    method: 'post',
    data: data,
  })
}