import request from '@/utils/request'

// 查询结算费率列表
export function listRate(query) {
  return request({
    url: '/mapi/settlement/rate/list',
    method: 'get',
    params: query
  })
}

// 查询结算费率详细
export function getRate(id) {
  return request({
    url: '/mapi/settlement/rate/' + id,
    method: 'get'
  })
}

// 新增结算费率
export function addRate(data) {
  return request({
    url: '/mapi/settlement/rate',
    method: 'post',
    data: data
  })
}

// 修改结算费率
export function updateRate(data) {
  return request({
    url: '/mapi/settlement/rate',
    method: 'put',
    data: data
  })
}

// 删除结算费率
export function delRate(id) {
  return request({
    url: '/mapi/settlement/rate/' + id,
    method: 'delete'
  })
}


// 修改结算费率状态
export function updateRateStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/settlement/rate/updateStatus',
    method: 'post',
    data: data
  })
}
