import request from '@/utils/request'

// 查询食品经营许可证信息列表
export function listLicense(query) {
  return request({
    url: '/basicData/xcrFoodBusinessLicense/findByPage',
    method: 'get',
    params: query
  })
}

// 查询食品经营许可证信息详细
export function getLicense(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodBusinessLicense/' + xhCodeId,
    method: 'get'
  })
}

// 新增食品经营许可证信息
export function addLicense(data) {
  return request({
    url: '/basicData/xcrFoodBusinessLicense',
    method: 'post',
    data: data
  })
}

// 修改食品经营许可证信息
export function updateLicense(data) {
  return request({
    url: '/basicData/xcrFoodBusinessLicense',
    method: 'put',
    data: data
  })
}

// 删除食品经营许可证信息
export function delLicense(xhCodeId) {
  return request({
    url: '/basicData/xcrFoodBusinessLicense/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delLicenseBatch(ids) {
  return request.post('/basicData/xcrFoodBusinessLicense/delete',ids)
}
