import request from '@/utils/request'

// 查询订单列表
export function listPay(query) {
  return request({
    url: '/system/pay/list',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getPay(id) {
  return request({
    url: '/system/pay/' + id,
    method: 'get'
  })
}

// 新增订单
export function addPay(data) {
  return request({
    url: '/system/pay',
    method: 'post',
    data: data
  })
}

// 修改订单
export function updatePay(data) {
  return request({
    url: '/system/pay',
    method: 'put',
    data: data
  })
}

// 删除订单
export function delPay(id) {
  return request({
    url: '/system/pay/' + id,
    method: 'delete'
  })
}

export function findJlListAll(jlId) {
  return request({
    url: `/drivingSchool/system/schoolCoach/findSelfJlListByJxId?jxId=${jlId}`,
    method: 'get'
  })
}

export function updatePayById(id, name, jlId) {
  return request({
    url: `/system/pay/updatePayById?id=${id}&name=${name}&jlId=${jlId}`,
    method: 'get'
  })
}

