import request from '@/utils/request'

// 查询充值多送活动明细列表
export function listRechargeItem(query) {
  return request({
    url: '/mapi/activity/rechargeItem/list',
    method: 'get',
    params: query
  })
}

// 查询充值多送活动明细详细
export function getRechargeItem(id) {
  return request({
    url: '/mapi/activity/rechargeItem/' + id,
    method: 'get'
  })
}

// 新增充值多送活动明细
export function addRechargeItem(data) {
  return request({
    url: '/mapi/activity/rechargeItem',
    method: 'post',
    data: data
  })
}

// 修改充值多送活动明细
export function updateRechargeItem(data) {
  return request({
    url: '/mapi/activity/rechargeItem',
    method: 'put',
    data: data
  })
}

// 删除充值多送活动明细
export function delRechargeItem(id) {
  return request({
    url: '/mapi/activity/rechargeItem/' + id,
    method: 'delete'
  })
}


// 修改充值多送活动明细状态
export function updateRechargeItemStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/activity/rechargeItem/updateStatus',
    method: 'post',
    data: data
  })
}


// 获取套餐相关的活动信息
export function getRechargeTypeRelationActivityInfo(rechargeTypeId, orgId) {
  return request({
    url: '/mapi/activity/rechargeItem/getRechargeTypeRelationActivityInfo',
    method: 'get',
    params: {
      rechargeTypeId : rechargeTypeId,
      orgId : orgId
    }
  })
}
