import request from '@/utils/request'

export function listBusiness(query) {
  return request({
    url: '/customer-business/page',
    method: 'get',
    params: query
  })
}

export function createBusiness(data) {
  return request({
    url: '/customer-business/add',
    method: 'post',
    data
  })
}

export function readBusiness(data) {
  return request({
    url: '/customer-business/info',
    method: 'get',
    data
  })
}

export function updateBusiness(data) {
  return request({
    url: '/customer-business/edit',
    method: 'post',
    data
  })
}

export function deleteBusiness(query) {
  return request({
    url: '/customer-business/remove',
    method: 'post',
    params: query
  })
}

export function setState(query) {
  return request({
    url: '/customer-business/updateStatus',
    method: 'post',
    params: query
  })
}
