import request from '@/utils/request'

// 查询商家管理列表
export function listMallShopShop(query) {
  return request({
    url: '/mall/mallShopShop/list',
    method: 'get',
    params: query
  })
}

// 查询商家管理详细
export function getMallShopShop(shopId) {
  return request({
    url: '/mall/mallShopShop/' + shopId,
    method: 'get'
  })
}

// 新增商家管理
export function addMallShopShop(data) {
  return request({
    url: '/mall/mallShopShop',
    method: 'post',
    data: data
  })
}

// 修改商家管理
export function updateMallShopShop(data) {
  return request({
    url: '/mall/mallShopShop',
    method: 'put',
    data: data
  })
}

// 删除商家管理
export function delMallShopShop(shopId) {
  return request({
    url: '/mall/mallShopShop/' + shopId,
    method: 'delete'
  })
}

// 导出商家管理
export function exportMallShopShop(query) {
  return request({
    url: '/mall/mallShopShop/export',
    method: 'get',
    params: query
  })
}

// 商家重置密码
export function resetPasswordShop(data) {
  return request({
    url: '/mall/mallShopShop/resetPasswordShop',
    method: 'post',
    data: data
  })
}

// 根据上级id获取省市区列表（0-省级）
export function getRegionByPid(pid) {
  return request({
    url: '/mall/mallRegion/getRegionByPid/' + pid,
    method: 'get'
  })
}

// 店铺和供应商级联
export function getAllShopList() {
  return request({
    url: '/mall/mallShopShop/selectAllShopList/',
    method: 'get'
  })
}

// 查询商家管理列表
export function selectShopShopList(query) {
  return request({
    url: '/mall/mallShopShop/selectShopShopList',
    method: 'get',
    params: query
  })
}
