import request from '@/utils/request'

// 新增商家商品
export function businessProductAdd (data) {
  return request({
    url: '/ticket/businessProduct/add',
    method: 'post',
    data
  })
}
// 删除商家商品
export function businessProductDel (businessProductId) {
  return request({
    url: `/ticket/businessProduct/del/${businessProductId}`,
    method: 'post',
  })
}
// 修改商家商品
export function businessProductEdit (data) {
  return request({
    url: `/ticket/businessProduct/edit`,
    method: 'post',
    data
  })
}
// 获取商家商品详细信息
export function businessProductInfo (businessProductId) {
  return request({
    url: `/ticket/businessProduct/info/${businessProductId}`,
    method: 'get',
  })
}
// 查询商家商品列表
export function businessProductPage (query) {
  return request({
    url: `/ticket/businessProduct/page`,
    method: 'get',
    params: query
  })
}
// 设置商家上下架
export function businessProductStatus (productId) {
  return request({
    url: `/ticket/businessProduct/shelvedStatus/${productId}`,
    method: 'post',
  })
}
// 查询商品下商品码列表
export function businessProductCodePage (query) {
  return request({
    url: `/system/businessProductCode/page`,
    method: 'get',
    params: query
  })
}
// // 票据码核销
// export function verification (data) {
//   return request({
//     url: `/system/businessProduct/orderCoupon/verification`,
//     method: 'post',
//     data
//   })
// }
// 商品码作废
export function businessProductCodeCancel (data) {
  return request({
    url: `/system/businessProductCode/cancel`,
    method: 'post',
    data
  })
}
// 商品码延期
export function businessProductCodeDelay (data) {
  return request({
    url: `/system/businessProductCode/delay`,
    method: 'post',
    data
  })
}
// 商品下商品码统计
export function businessProductCodeStatistics (query) {
  return request({
    url: `/system/businessProductCode/statistics`,
    method: 'get',
    params: query
  })
}
// 删除商品码
export function businessProductCodeDel (codeIds) {
  return request({
    url: `/system/businessProductCode/del/${codeIds}`,
    method: 'post',
  })
}
// 商品码批量核销
export function businessProductCodeVerification (data) {
  return request({
    url: `/system/businessProductCode/verification`,
    method: 'post',
    data
  })
}