import http from "@/util/http.js";

// 平台货品列表
export function platGoodsList(params) {
    return http({
        url: "/api/plat_goods",
        method: "get",
        params,
    });
}

export function updateSyncStatus(id, params) {
    return http({
        url: "/api/plat_goods/" + id,
        method: "patch",
        params,
    });
}

export function deletePlatGoods(id) {
    return http({
        url: "/api/plat_goods/" + id,
        method: "delete",
    });
}

export function syncStock(id) {
    return http({
        url: "/api/plat/sync/" + id + "/stock/",
        method: "post",
    });
}

export function activityList(shopId) {
    return http({
        url: "/api/plat_group_activity/" + shopId,
        method: "get",
    });
}

// 平台订单列表
export function platOrderList(params) {
    return http({
        url: "/api/plat_orders",
        method: "get",
        params
    });
}

export function platOrderExport(params) {
    return http({
        url: "/plat_orders/export",
        method: "get",
        params,
    });
}

export function printOrders(params) {
    return http({
        url: "/api/print/orders",
        method: "get",
        params
    });
}

export function printSuccess(params) {
    return http({
        url: "/api/print/success",
        method: "put",
        params
    });
}
