import request from '@/utils/request'

// 分页查询剧院
export const pageList = (query) => {
  return request({
    url: '/merchant/merchantPerformTime/list',
    method: 'get',
    params: query
  })
}

// 分页查询剧院
export const pagePerformTimeList = (query) => {
  return request({
    url: '/merchant/merchantPerformTime/list',
    method: 'get',
    params: query
  })
}

// 新增/修改
export const saveAndEdit = (data) => {
  return request({
    url: '/merchant/merchantPerformTime/insertOrUpdate',
    method: 'post',
    data: data
  })
}

// 批量添加排期
export const addSave = (data) => {
  return request({
    url: '/merchant/merchantPerformTime/save',
    method: 'post',
    data: data
  })
}


// 删除模板
export const deleteById = (id) => {
  return request({
    url: '/merchant/merchantPerformTime/deleteById',
    method: 'delete',
    params: {id:id}
  })
}

// 删除模板
export const deleteBatchById = (id) => {
  return request({
    url: '/merchant/merchantPerformTime/deleteByIds',
    method: 'delete',
    params: {ids:id}
  })
}

// 票务查询

export const goodsPageList = (query) => {
  return request({
    url: '/goods/goods/listByPerformId',
    method: 'get',
    params: query
  })
}

// 发布与下线
export const ionline = (data) => {
  return request({
    url: '/merchant/merchantPerformTime/updateStatus',
    method: 'put',
    data: data
  })
}
