import request from '@/utils/request'

// 查询商品列表
export function listMallGoodsGoods(query) {
  return request({
    url: '/mall/mallGoodsGoods/list',
    method: 'get',
    params: query
  })
}

// 查询其他商铺/供应商商品列表
export function listOtherGoods(query) {
  return request({
    url: '/mall/mallGoodsGoods/otherList',
    method: 'get',
    params: query
  })
}

// 查询商品下拉列表
export function goodsGoodsSelectList() {
  return request({
    url: '/mall/mallGoodsGoods/goodsGoodsSelectList',
    method: 'get'
  })
}

// 查询商品详细
export function getMallGoodsGoods(id) {
  return request({
    url: '/mall/mallGoodsGoods/' + id,
    method: 'get'
  })
}

// 新增商品
export function addMallGoodsGoods(data) {
  return request({
    url: '/mall/mallGoodsGoods',
    method: 'post',
    data: data
  })
}

// 修改商品
export function updateMallGoodsGoods(data) {
  return request({
    url: '/mall/mallGoodsGoods',
    method: 'put',
    data: data
  })
}

// 修改审核
export function updateCheckStatus(data) {
  return request({
    url: '/mall/mallGoodsGoods/updateCheckStatus',
    method: 'post',
    data: data
  })
}

// 修改供应商
export function updateSupplier(data) {
  return request({
    url: '/mall/mallGoodsGoods/updateSupplier',
    method: 'post',
    data: data
  })
}

// 删除商品
export function delMallGoodsGoods(id) {
  return request({
    url: '/mall/mallGoodsGoods/' + id,
    method: 'delete'
  })
}

// 导出筛选商品
export function exportMallGoodsGoodsScreen(query) {
  return request({
    url: '/mall/mallGoodsGoods/exportScreen',
    method: 'get',
    params: query
  })
}
// 导出勾选商品
export function exportMallGoodsGoodsCheck(data) {
  return request({
    url: '/mall/mallGoodsGoods/exportCheck',
    method: 'post',
    data:data
  })
}

// 导出商品
export function getClassList() {
  return request({
    url: '/mall/mallGoodsClass/getClassList',
    method: 'get'
  })
}
// 查询下拉分类
export function getClassSelectList() {
  return request({
    url: '/mall/mallGoodsClass/getClassSelectList',
    method: 'get'
  })
}
// 导出商品
export function getSpecList() {
  return request({
    url: '/mall/mallGoodsSpec/getSpecList',
    method: 'get'
  })
}
// 排序
export function Goodssort() {
  return request({
    url: '/mall/mallGoodsGoods/Goodssort',
    method: 'post'
  })
}
