import request from '@/utils/request'

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


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

// 详情
export const getSelectById = (params) => {
  return request({
    url: '/merchant/stockTmp/selectById',
    method: 'get',
    params
  })
}
// 删除模板
export const deleteById = (params) => {
  return request({
    url: '/merchant/stockTmp/deleteById',
    method: 'delete',
    params
  })
}


/**  发布  */
export function releaseById(data) {
  return request({
    url: '/merchant/stockTmp/updateStatus',
    method: 'post',
    data
  })
}


/**  获取座位可用数量  */
export function countBySeatTyp(params) {
  return request({
    url: '/merchant/merchantAuditoriumSeat/countBySeatType',
    method: 'get',
    params
  })
}

/**  获取渠道数据  */
export function channelType(params) {
  return request({
    url: '/system/dict/data/type/channel_type',
    method: 'get',
    params
  })
}
