import request from '@/router/axios'

export function shipsImmediatelyApi(parameter) {
  return request({
    url: '/admin/merchantMallGoods/shipsImmediately',
    method: 'get',
    params:parameter
  })
}
export function cancelOrderSubApi(parameter) {
  return request({
    url: '/admin/merchantMallGoods/cancelOrder',
    method: 'get',
    params:parameter
  })
}


export function getMerchantByAccount(parameter) {
  return request({
    url: '/admin/merchantMallGoods/getMerchantByAccount',
    method: 'get',
    params:parameter
  })
}

export function isUpon(parameter) {
  return request({
    url: '/admin/merchantMallGoods/batchUpon',
    method: 'put',
    params:parameter
  })
}

export function isNotUpon(parameter) {
  return request({
    url: '/admin/merchantMallGoods/batchDown',
    method: 'put',
    params:parameter
  })
}

export function fetchList(query) {
  return request({
    url: '/admin/merchantMallGoods/page',
    method: 'get',
    params: query
  })
}

export function getGoodsInfo(query) {
  return request({
    url: '/admin/merchantMallGoods/getMerchantGoodsDetail',
    method: 'get',
    params: query
  })
}


export function addObj(obj) {
  return request({
    url: '/general/merchantMallGoods',
    method: 'post',
    params: obj
  })
}

export function getObj(id) {
  return request({
    url: '/general/merchantMallGoods/' + id,
    method: 'get'
  })
}


export function putObj(obj) {
  return request({
    url: '/admin/merchantMallGoods',
    method: 'put',
    params: obj
  })
}



export function delObj(parameter) {
  return request({
    url: '/admin/merchantMallGoods',
    method: 'delete',
    params:parameter
  })
}


export function getGoodsDetails(query) {
  return request({
    url: '/admin/mallGoods/getDetailsById',
    method: 'get',
    params: query
  })
}

