import request from '@/utils/request'

// 查询个体工商户基本信息列表
export function listCommerce(query) {
  return request({
    url: '/basicData/xcrIndustryCommerce/findByPage',
    method: 'get',
    params: query
  })
}

// 查询个体工商户基本信息详细
export function getCommerce(xhCodeId) {
  return request({
    url: '/basicData/xcrIndustryCommerce/' + xhCodeId,
    method: 'get'
  })
}

// 新增个体工商户基本信息
export function addCommerce(data) {
  return request({
    url: '/basicData/xcrIndustryCommerce',
    method: 'post',
    data: data
  })
}

// 修改个体工商户基本信息
export function updateCommerce(data) {
  return request({
    url: '/basicData/xcrIndustryCommerce',
    method: 'put',
    data: data
  })
}

// 删除个体工商户基本信息
export function delCommerce(xhCodeId) {
  return request({
    url: '/basicData/xcrIndustryCommerce/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delCommerceBatch(ids) {
  return request.post('/basicData/xcrIndustryCommerce/delete',ids)
}
