import request from '@/utils/request'

export function listFeishuAccount(query) {
  return request({
    url: '/qw/feishuAccount/list',
    method: 'get',
    params: query
  })
}

export function getFeishuAccount(id) {
  return request({
    url: '/qw/feishuAccount/' + id,
    method: 'get'
  })
}

export function addFeishuAccount(data) {
  return request({
    url: '/qw/feishuAccount',
    method: 'post',
    data: data
  })
}

export function updateFeishuAccount(data) {
  return request({
    url: '/qw/feishuAccount',
    method: 'put',
    data: data
  })
}

export function delFeishuAccount(id) {
  return request({
    url: '/qw/feishuAccount/' + id,
    method: 'delete'
  })
}

export function changeFeishuAccountStatus(data) {
  return request({
    url: '/qw/feishuAccount/changeStatus',
    method: 'put',
    data: data
  })
}

/** 分配/解绑销售 */
export function assignFeishuAccountSales(data) {
  return request({
    url: '/qw/feishuAccount/assignSales',
    method: 'put',
    data: data
  })
}
