import request from '@/utils/request'

// 查询充电桩枪口信息列表
export function listConnector(query) {
  return request({
    url: '/pile/connector/list',
    method: 'get',
    params: query
  })
}

// 查询充电桩枪口信息详细
export function getConnector(id) {
  return request({
    url: '/pile/connector/' + id,
    method: 'get'
  })
}

// 新增充电桩枪口信息
export function addConnector(data) {
  return request({
    url: '/pile/connector',
    method: 'post',
    data: data
  })
}

// 修改充电桩枪口信息
export function updateConnector(data) {
  return request({
    url: '/pile/connector',
    method: 'put',
    data: data
  })
}

// 删除充电桩枪口信息
export function delConnector(id) {
  return request({
    url: '/pile/connector/' + id,
    method: 'delete'
  })
}

// 通过入参查询接口列表
export function queryConnectorListByParams(data) {
  console.log("通过入参查询接口列表", data);
  return request({
    url: '/pile/connector/getConnectorInfoListByParams',
    method: 'post',
    data: data
  })
}
