import request from '@/utils/request'

// 查询充电桩SIM卡信息列表
export function listSim(query) {
  return request({
    url: '/pile/sim/list',
    method: 'get',
    params: query
  })
}

// 后管查询充电桩SIM卡信息列表
export function getSimInfo(data) {
  return request({
    url: '/pile/sim/getSimInfo',
    method: 'post',
    params: data
  })
}

// 查询充电桩SIM卡信息详细
export function getSim(id) {
  return request({
    url: '/pile/sim/' + id,
    method: 'get'
  })
}

// 新增充电桩SIM卡信息
export function addSim(data) {
  return request({
    url: '/pile/sim',
    method: 'post',
    data: data
  })
}

// 修改充电桩SIM卡信息
export function updateSim(data) {
  return request({
    url: '/pile/sim',
    method: 'put',
    data: data
  })
}

// 删除充电桩SIM卡信息
export function delSim(id) {
  return request({
    url: '/pile/sim/' + id,
    method: 'delete'
  })
}

export function simRenew(data) {
  return request({
    url: '/pile/sim/simRenew',
    method: 'post',
    data: data
  })
}
