import request from '@/utils/request'

// 查询APP第三方管理列表
export function listThirdParty(query) {
  return request({
    url: '/mapi/coupon/thirdParty/list',
    method: 'get',
    params: query
  })
}

// 查询APP第三方管理详细
export function getThirdParty(id) {
  return request({
    url: '/mapi/coupon/thirdParty/' + id,
    method: 'get'
  })
}

// 新增APP第三方管理
export function addThirdParty(data) {
  return request({
    url: '/mapi/coupon/thirdParty',
    method: 'post',
    data: data
  })
}

// 修改APP第三方管理
export function updateThirdParty(data) {
  return request({
    url: '/mapi/coupon/thirdParty',
    method: 'put',
    data: data
  })
}

// 删除APP第三方管理
export function delThirdParty(id) {
  return request({
    url: '/mapi/coupon/thirdParty/' + id,
    method: 'delete'
  })
}


// 修改APP第三方管理状态
export function updateThirdPartyStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/coupon/thirdParty/updateStatus',
    method: 'post',
    data: data
  })
}
