import request from '@/utils/request'

// 查询网贷及分期历史列表
export function listInstallmentHistory(query) {
  return request({
    url: '/invest/installmentHistory/list',
    method: 'get',
    params: query
  })
}

// 查询网贷及分期历史详细
export function getInstallmentHistory(id) {
  return request({
    url: '/invest/installmentHistory/' + id,
    method: 'get'
  })
}

// 新增网贷及分期历史
export function addInstallmentHistory(data) {
  return request({
    url: '/invest/installmentHistory',
    method: 'post',
    data
  })
}

// 修改网贷及分期历史
export function updateInstallmentHistory(data) {
  return request({
    url: '/invest/installmentHistory',
    method: 'put',
    data
  })
}

// 删除网贷及分期历史
export function delInstallmentHistory(id) {
  return request({
    url: '/invest/installmentHistory/' + id,
    method: 'delete'
  })
}
