import request from '@/utils/request'

// 查询商户列表
export function listShanghu(query) {
  return request({
    url: '/netEwm/shanghu/list',
    method: 'get',
    params: query
  })
}

// 查询商户详细
export function getShanghu(id) {
  return request({
    url: '/netEwm/shanghu/' + id,
    method: 'get'
  })
}

// 新增商户
export function addShanghu(data) {
  return request({
    url: '/netEwm/shanghu',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateShanghu(data) {
  return request({
    url: '/netEwm/shanghu',
    method: 'put',
    data: data
  })
}

// 删除商户
export function delShanghu(id) {
  return request({
    url: '/netEwm/shanghu/' + id,
    method: 'delete'
  })
}
