import request from "@/utils/request.js";

/**
 * 查询分类信息
 * @param {*} params
 * @returns
 */
export function categoryList(params) {
  return request({
    method: "get",
    url: "/product/admin/prod/category/list",
    params,
  });
}

/**
 * 查询商品列表
 * @param {*} params
 * @returns
 */
export function productPage(params) {
  return request({
    method: "get",
    url: "/product/admin/product/list",
    params,
  });
}

/**
 * 商品上下架
 * @param {*} data
 * @returns
 */
export function productOnOff(data) {
  return request({
    method: "post",
    url: "/product/admin/product/onOff",
    data,
  });
}

/**
 * 商品售罄
 * @param {*} data
 * @returns
 */
export function markIsSoldOut(data) {
  return request({
    method: "post",
    url: "/product/admin/product/markIsSoldOut",
    data,
  });
}

/**
 * 获取存酒商品列表
 * @param {*} params
 * @returns
 */
export function storageGoodGet(params) {
  return request({
    method: "get",
    url: "/product/admin/storageGood",
    params,
  });
}

/**
 * 存酒记录添加
 * @param {*} data
 * @returns
 */
export function shopStoragePost(data) {
  return request({
    method: "post",
    url: "/product/admin/shopStorage",
    data,
  });
}

/**
 * 存酒记录
 * @param {*} data
 * @returns
 */
export function shopStorageGet(params) {
  return request({
    method: "get",
    url: "/product/admin/shopStorage",
    params,
  });
}

/**
 * 存酒取酒
 * @param {*} data
 * @returns
 */
export function shopStoragePut(data) {
  return request({
    method: "put",
    url: "/product/admin/shopStorage",
    data,
  });
}


/**
 * 查询存取酒记录
 * @param {*} data
 * @returns
 */
export function shopStorageRecord(params) {
  return request({
    method: "get",
    url: "/product/admin/shopStorage/record",
    params,
  });
}

