import request from '@/utils/request'

// 创建商户
export function createBusinessInfo(data) {
  return request({
    url: '/basic/business-info/create',
    method: 'post',
    data: data
  })
}

// 更新商户
export function updateBusinessInfo(data) {
  return request({
    url: '/basic/business-info/update',
    method: 'put',
    data: data
  })
}

// 删除商户
export function deleteBusinessInfo(id) {
  return request({
    url: '/basic/business-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得商户
export function getBusinessInfo(id) {
  return request({
    url: '/basic/business-info/get?id=' + id,
    method: 'get'
  })
}

// 获得商户分页
export function getBusinessInfoPage(query) {
  return request({
    url: '/basic/business-info/page',
    method: 'get',
    params: query
  })
}

// 获得商户名称列表
export function getBusinessNameList(query) {
  return request({
    url: '/basic/business-info/getBusinessNameList',
    method: 'get',
    params: query,
  })
}
