import request from '@/utils/request'

// 查询sopUserLogs列表
export function listSopUserLogs(query) {
  return request({
    url: '/app/userLogs/list',
    method: 'get',
    params: query
  })
}

// 查询sopUserLogs详细
export function getSopUserLogs(id) {
  return request({
    url: '/qwSop/sopUserLogs/' + id,
    method: 'get'
  })
}

// 新增sopUserLogs
export function addSopUserLogs(data) {
  return request({
    url: '/qwSop/sopUserLogs',
    method: 'post',
    data: data
  })
}

// 修改sopUserLogs
export function updateSopUserLogs(data) {
  return request({
    url: '/qwSop/sopUserLogs',
    method: 'put',
    data: data
  })
}
// 修改sopUserLogs
export function updateLogDate(data) {
  return request({
    url: '/qwSop/sopUserLogs/updateLogDate',
    method: 'post',
    data: data
  })
}

export function replaceUser(data) {
  return request({
    url: '/qwSop/sopUserLogs/replaceUser',
    method: 'post',
    data: data
  })
}
// 修改sopUserLogs
export function addGroupChat(data) {
  return request({
    url: '/qwSop/sopUserLogs/addGroupChat',
    method: 'post',
    data: data
  })
}

// 删除sopUserLogs
export function delSopUserLogs(id) {
  return request({
    url: '/app/userLogs/' + id,
    method: 'delete'
  })
}

export function updateTimeSopUserLogs(data) {
  return request({
    url: '/app/userLogs/batchUpdateSopUserLogsToTime',
    method: 'post',
    data: data
  })
}

// 导出sopUserLogs
export function exportSopUserLogs(query) {
  return request({
    url: '/qwSop/sopUserLogs/export',
    method: 'get',
    params: query
  })
}

// 导出sopUserLogs
export function getSelectChat(id) {
  return request({
    url: '/qwSop/sopUserLogs/getSelectChat',
    method: 'get',
    params: {id}
  })
}

//修复营期
export function repairSopUserLogs(data) {
  return request({
    url: '/qwSop/sopUserLogs/repairSopUserLogs',
    method: 'post',
    data: data
  })
}

export function getCompanyMiniAppList() {
  return request({
    url: '/company/companyConfig/getCompanyMiniAppList',
    method: 'get'
  })
}
export function getShortLink(data) {
  return request({
    url: '/qwSop/sopUserLogs/getShortLink',
    method: 'get',
    params: data
  })
}


export function groupSendMessage(data) {
  return request({
    url: '/app/userLogs/groupSendMessage',
    method: 'post',
    data: data
  })
}
