import request from '@/utils/request'

// 查询入驻商家列表
export function listMerchants(query) {
  return request({
    url: '/system/merchants/list',
    method: 'get',
    params: query
  })
}

// 查询入驻商家详细
export function getMerchants(businessId) {
  return request({
    url: '/system/merchants/' + businessId,
    method: 'get'
  })
}

// 新增入驻商家
export function addMerchants(data) {
  return request({
    url: '/system/merchants',
    method: 'post',
    data: data
  })
}

// 修改入驻商家
export function updateMerchants(data) {
  return request({
    url: '/system/merchants',
    method: 'put',
    data: data
  })
}

// 删除入驻商家
export function delMerchants(businessId) {
  return request({
    url: '/system/merchants/' + businessId,
    method: 'delete'
  })
}
