feat(产品管理): 新增批量导入导出功能并优化表格操作列
fix(用户管理): 添加邮箱字段支持及查询条件 refactor(API): 重构媒体和客户API接口路径及参数 perf(订单管理): 优化批量删除性能并添加导出功能 style(表格): 固定操作列并添加横向滚动支持 docs(类型定义): 更新API接口类型注释及DTO结构 test(产品表单): 完善变体表单处理逻辑 chore: 更新依赖及配置文件
This commit is contained in:
parent
d40f157b78
commit
37b266410a
|
|
@ -28,6 +28,12 @@ const ListPage: React.FC = () => {
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '邮箱',
|
||||||
|
dataIndex: 'email',
|
||||||
|
sorter: true,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '超管',
|
title: '超管',
|
||||||
|
|
@ -105,6 +111,7 @@ const ListPage: React.FC = () => {
|
||||||
current = 1,
|
current = 1,
|
||||||
pageSize = 10,
|
pageSize = 10,
|
||||||
username,
|
username,
|
||||||
|
email,
|
||||||
isActive,
|
isActive,
|
||||||
isSuper,
|
isSuper,
|
||||||
remark,
|
remark,
|
||||||
|
|
@ -112,6 +119,8 @@ const ListPage: React.FC = () => {
|
||||||
console.log(`params`, params, sort);
|
console.log(`params`, params, sort);
|
||||||
const qp: any = { current, pageSize };
|
const qp: any = { current, pageSize };
|
||||||
if (username) qp.username = username;
|
if (username) qp.username = username;
|
||||||
|
// 条件判断 透传邮箱查询参数
|
||||||
|
if (email) qp.email = email;
|
||||||
if (typeof isActive !== 'undefined' && isActive !== '')
|
if (typeof isActive !== 'undefined' && isActive !== '')
|
||||||
qp.isActive = String(isActive);
|
qp.isActive = String(isActive);
|
||||||
if (typeof isSuper !== 'undefined' && isSuper !== '')
|
if (typeof isSuper !== 'undefined' && isSuper !== '')
|
||||||
|
|
@ -190,6 +199,13 @@ const CreateForm: React.FC<{
|
||||||
placeholder="请输入用户名"
|
placeholder="请输入用户名"
|
||||||
rules={[{ required: true, message: '请输入用户名' }]}
|
rules={[{ required: true, message: '请输入用户名' }]}
|
||||||
/>
|
/>
|
||||||
|
<ProFormText
|
||||||
|
name="email"
|
||||||
|
label="邮箱"
|
||||||
|
width="lg"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
rules={[{ type: 'email', message: '请输入正确的邮箱' }]}
|
||||||
|
/>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="password"
|
name="password"
|
||||||
label="密码"
|
label="密码"
|
||||||
|
|
@ -221,6 +237,7 @@ const EditForm: React.FC<{
|
||||||
trigger={<Button type="link">编辑</Button>}
|
trigger={<Button type="link">编辑</Button>}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
username: record.username,
|
username: record.username,
|
||||||
|
email: record.email,
|
||||||
isSuper: record.isSuper,
|
isSuper: record.isSuper,
|
||||||
isAdmin: record.isAdmin,
|
isAdmin: record.isAdmin,
|
||||||
remark: record.remark,
|
remark: record.remark,
|
||||||
|
|
@ -250,6 +267,13 @@ const EditForm: React.FC<{
|
||||||
placeholder="请输入用户名"
|
placeholder="请输入用户名"
|
||||||
rules={[{ required: true, message: '请输入用户名' }]}
|
rules={[{ required: true, message: '请输入用户名' }]}
|
||||||
/>
|
/>
|
||||||
|
<ProFormText
|
||||||
|
name="email"
|
||||||
|
label="邮箱"
|
||||||
|
width="lg"
|
||||||
|
placeholder="请输入邮箱"
|
||||||
|
rules={[{ type: 'email', message: '请输入正确的邮箱' }]}
|
||||||
|
/>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
name="password"
|
name="password"
|
||||||
label="密码(不填不改)"
|
label="密码(不填不改)"
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ import {
|
||||||
} from '@/servers/api/product';
|
} from '@/servers/api/product';
|
||||||
import { sitecontrollerAll } from '@/servers/api/site';
|
import { sitecontrollerAll } from '@/servers/api/site';
|
||||||
import {
|
import {
|
||||||
wpproductcontrollerBatchSyncToSite,
|
wpproductcontrollerBatchsynctosite,
|
||||||
wpproductcontrollerGetwpproducts,
|
wpproductcontrollerGetwpproducts,
|
||||||
wpproductcontrollerSyncToProduct,
|
wpproductcontrollerSynctoproduct,
|
||||||
} from '@/servers/api/wpProduct';
|
} from '@/servers/api/wpProduct';
|
||||||
import { ActionType, ModalForm, PageContainer, ProColumns, ProFormSelect, ProFormText, ProTable } from '@ant-design/pro-components';
|
import { ActionType, ModalForm, PageContainer, ProColumns, ProFormSelect, ProFormText, ProTable } from '@ant-design/pro-components';
|
||||||
import { request } from '@umijs/max';
|
import { request } from '@umijs/max';
|
||||||
|
|
@ -189,7 +189,7 @@ const SyncToSiteModal: React.FC<{
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
if (!values.siteId) return false;
|
if (!values.siteId) return false;
|
||||||
try {
|
try {
|
||||||
await wpproductcontrollerBatchSyncToSite(
|
await wpproductcontrollerBatchsynctosite(
|
||||||
{ siteId: values.siteId },
|
{ siteId: values.siteId },
|
||||||
{ productIds }
|
{ productIds }
|
||||||
);
|
);
|
||||||
|
|
@ -295,7 +295,7 @@ const WpProductInfo: React.FC<{ skus: string[]; record: API.Product; parentTable
|
||||||
key="syncToSite"
|
key="syncToSite"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
try {
|
try {
|
||||||
await wpproductcontrollerBatchSyncToSite(
|
await wpproductcontrollerBatchsynctosite(
|
||||||
{ siteId: wpRow.siteId },
|
{ siteId: wpRow.siteId },
|
||||||
{ productIds: [record.id] },
|
{ productIds: [record.id] },
|
||||||
);
|
);
|
||||||
|
|
@ -312,7 +312,7 @@ const WpProductInfo: React.FC<{ skus: string[]; record: API.Product; parentTable
|
||||||
key="syncToProduct"
|
key="syncToProduct"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
try {
|
try {
|
||||||
await wpproductcontrollerSyncToProduct({ id: wpRow.id });
|
await wpproductcontrollerSynctoproduct({ id: wpRow.id });
|
||||||
message.success('同步进商品成功');
|
message.success('同步进商品成功');
|
||||||
parentTableRef.current?.reload();
|
parentTableRef.current?.reload();
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ const SiteList: React.FC = () => {
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'actions',
|
dataIndex: 'actions',
|
||||||
width: 240,
|
width: 240,
|
||||||
|
fixed:"right",
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
render: (_, row) => (
|
render: (_, row) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
|
@ -380,6 +381,7 @@ const SiteList: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProTable<SiteItem>
|
<ProTable<SiteItem>
|
||||||
|
scroll={{ x: 'max-content' }}
|
||||||
actionRef={actionRef}
|
actionRef={actionRef}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ActionType, DrawerForm, ModalForm, PageContainer, ProColumns, ProFormText, ProTable } from '@ant-design/pro-components';
|
import { ActionType, DrawerForm, ModalForm, PageContainer, ProColumns, ProFormText, ProFormTextArea, ProTable } from '@ant-design/pro-components';
|
||||||
import { request, useParams } from '@umijs/max';
|
import { request, useParams } from '@umijs/max';
|
||||||
import { App, Avatar, Button, Popconfirm, Space, Tag } from 'antd';
|
import { App, Avatar, Button, Popconfirm, Space, Tag } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
|
|
@ -51,6 +51,7 @@ const BatchEditCustomers: React.FC<{
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProFormText name="role" label="角色" placeholder="请输入角色,不修改请留空" />
|
<ProFormText name="role" label="角色" placeholder="请输入角色,不修改请留空" />
|
||||||
|
<ProFormText name="phone" label="电话" placeholder="请输入电话,不修改请留空" />
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -110,6 +111,12 @@ const CustomerPage: React.FC = () => {
|
||||||
dataIndex: 'email',
|
dataIndex: 'email',
|
||||||
copyable: true,
|
copyable: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '电话',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
render: (_, record) => record.phone || record.billing?.phone || record.shipping?.phone || '-',
|
||||||
|
copyable: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '角色',
|
title: '角色',
|
||||||
dataIndex: 'role',
|
dataIndex: 'role',
|
||||||
|
|
@ -217,6 +224,7 @@ const CustomerPage: React.FC = () => {
|
||||||
<ProFormText name="first_name" label="名" />
|
<ProFormText name="first_name" label="名" />
|
||||||
<ProFormText name="last_name" label="姓" />
|
<ProFormText name="last_name" label="姓" />
|
||||||
<ProFormText name="username" label="用户名" />
|
<ProFormText name="username" label="用户名" />
|
||||||
|
<ProFormText name="phone" label="电话" />
|
||||||
</DrawerForm>,
|
</DrawerForm>,
|
||||||
<BatchEditCustomers
|
<BatchEditCustomers
|
||||||
tableRef={actionRef}
|
tableRef={actionRef}
|
||||||
|
|
@ -224,20 +232,60 @@ const CustomerPage: React.FC = () => {
|
||||||
setSelectedRowKeys={setSelectedRowKeys}
|
setSelectedRowKeys={setSelectedRowKeys}
|
||||||
siteId={siteId}
|
siteId={siteId}
|
||||||
/>,
|
/>,
|
||||||
|
<Button
|
||||||
|
title="批量导出"
|
||||||
|
onClick={async () => {
|
||||||
|
if (!siteId) return;
|
||||||
|
const res = await request(`/site-api/${siteId}/customers/export`, { params: {} });
|
||||||
|
if (res?.success && res?.data?.csv) {
|
||||||
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'customers.csv';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
} else {
|
||||||
|
message.error(res.message || '导出失败');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>批量导出</Button>,
|
||||||
|
<ModalForm
|
||||||
|
title="批量导入客户"
|
||||||
|
trigger={<Button type="primary" ghost>批量导入</Button>}
|
||||||
|
width={600}
|
||||||
|
modalProps={{ destroyOnHidden: true }}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
if (!siteId) return false;
|
||||||
|
const csv = values.csv || '';
|
||||||
|
const items = values.items || [];
|
||||||
|
const res = await request(`/site-api/${siteId}/customers/import`, { method: 'POST', data: { csv, items } });
|
||||||
|
if (res.success) {
|
||||||
|
message.success('导入完成');
|
||||||
|
actionRef.current?.reload();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
message.error(res.message || '导入失败');
|
||||||
|
return false;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProFormTextArea name="csv" label="CSV文本" placeholder="粘贴CSV,首行为表头" />
|
||||||
|
</ModalForm>,
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
title="批量删除"
|
title="批量删除"
|
||||||
danger
|
danger
|
||||||
icon={<DeleteFilled />}
|
icon={<DeleteFilled />}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
if (!siteId) return;
|
if (!siteId) return;
|
||||||
let ok = 0, fail = 0;
|
const res = await request(`/site-api/${siteId}/customers/batch`, { method: 'POST', data: { delete: selectedRowKeys } });
|
||||||
for (const id of selectedRowKeys) {
|
|
||||||
const res = await request(`/site-api/${siteId}/customers/${id}`, { method: 'DELETE' });
|
|
||||||
if (res.success) ok++; else fail++;
|
|
||||||
}
|
|
||||||
message.success(`删除成功 ${ok} 条, 失败 ${fail} 条`);
|
|
||||||
actionRef.current?.reload();
|
actionRef.current?.reload();
|
||||||
setSelectedRowKeys([]);
|
setSelectedRowKeys([]);
|
||||||
|
if (res.success) {
|
||||||
|
message.success('批量删除成功');
|
||||||
|
} else {
|
||||||
|
message.warning(res.message || '部分删除失败');
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
]}
|
]}
|
||||||
|
|
@ -265,6 +313,7 @@ const CustomerPage: React.FC = () => {
|
||||||
<ProFormText name="first_name" label="名" />
|
<ProFormText name="first_name" label="名" />
|
||||||
<ProFormText name="last_name" label="姓" />
|
<ProFormText name="last_name" label="姓" />
|
||||||
<ProFormText name="username" label="用户名" />
|
<ProFormText name="username" label="用户名" />
|
||||||
|
<ProFormText name="phone" label="电话" />
|
||||||
</DrawerForm>
|
</DrawerForm>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ const MediaPage: React.FC = () => {
|
||||||
const { message } = App.useApp();
|
const { message } = App.useApp();
|
||||||
const { siteId } = useParams<{ siteId: string }>();
|
const { siteId } = useParams<{ siteId: string }>();
|
||||||
const [editing, setEditing] = useState<any>(null);
|
const [editing, setEditing] = useState<any>(null);
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||||
const actionRef = React.useRef<any>(null);
|
const actionRef = React.useRef<any>(null);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|
@ -134,6 +135,7 @@ const MediaPage: React.FC = () => {
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
actionRef={actionRef}
|
actionRef={actionRef}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
rowSelection={{ selectedRowKeys, onChange: setSelectedRowKeys }}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
if (!siteId) return { data: [], total: 0 };
|
if (!siteId) return { data: [], total: 0 };
|
||||||
|
|
||||||
|
|
@ -212,6 +214,43 @@ const MediaPage: React.FC = () => {
|
||||||
rules={[{ required: true, message: '请选择文件' }]}
|
rules={[{ required: true, message: '请选择文件' }]}
|
||||||
/>
|
/>
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
|
,
|
||||||
|
<Button
|
||||||
|
title="批量导出"
|
||||||
|
onClick={async () => {
|
||||||
|
if (!siteId) return;
|
||||||
|
const res = await request(`/site-api/${siteId}/media/export`, { params: {} });
|
||||||
|
if (res?.success && res?.data?.csv) {
|
||||||
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'media.csv';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
} else {
|
||||||
|
message.error(res.message || '导出失败');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>,
|
||||||
|
<Button
|
||||||
|
title="批量删除"
|
||||||
|
danger
|
||||||
|
icon={<DeleteOutlined />}
|
||||||
|
disabled={!selectedRowKeys.length}
|
||||||
|
onClick={async () => {
|
||||||
|
if (!siteId) return;
|
||||||
|
const res = await request(`/site-api/${siteId}/media/batch`, { method: 'POST', data: { delete: selectedRowKeys } });
|
||||||
|
if (res.success) {
|
||||||
|
message.success('批量删除成功');
|
||||||
|
} else {
|
||||||
|
message.warning(res.message || '部分删除失败');
|
||||||
|
}
|
||||||
|
setSelectedRowKeys([]);
|
||||||
|
actionRef.current?.reload();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ import {
|
||||||
PageContainer,
|
PageContainer,
|
||||||
ProColumns,
|
ProColumns,
|
||||||
ProTable,
|
ProTable,
|
||||||
|
ModalForm,
|
||||||
|
ProFormTextArea,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { request, useParams } from '@umijs/max';
|
import { request, useParams } from '@umijs/max';
|
||||||
import {
|
import {
|
||||||
|
|
@ -154,7 +156,6 @@ const OrdersPage: React.FC = () => {
|
||||||
setActiveLine={setActiveLine}
|
setActiveLine={setActiveLine}
|
||||||
siteId={siteId}
|
siteId={siteId}
|
||||||
/>
|
/>
|
||||||
<Divider type="vertical" />
|
|
||||||
<Dropdown
|
<Dropdown
|
||||||
menu={{
|
menu={{
|
||||||
items: [
|
items: [
|
||||||
|
|
@ -180,7 +181,6 @@ const OrdersPage: React.FC = () => {
|
||||||
</Button>
|
</Button>
|
||||||
</a>
|
</a>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<Divider type="vertical" />
|
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="确定删除订单?"
|
title="确定删除订单?"
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
|
|
@ -239,20 +239,59 @@ const OrdersPage: React.FC = () => {
|
||||||
disabled={!selectedRowKeys.length}
|
disabled={!selectedRowKeys.length}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
if (!siteId) return;
|
if (!siteId) return;
|
||||||
let ok = 0, fail = 0;
|
const res = await request(`/site-api/${siteId}/orders/batch`, {
|
||||||
for (const id of selectedRowKeys) {
|
method: 'POST',
|
||||||
const res = await request(`/site-api/${siteId}/orders/${id}`, { method: 'DELETE' });
|
data: { delete: selectedRowKeys },
|
||||||
if (res.success) ok++; else fail++;
|
});
|
||||||
}
|
|
||||||
setSelectedRowKeys([]);
|
setSelectedRowKeys([]);
|
||||||
actionRef.current?.reload();
|
actionRef.current?.reload();
|
||||||
if (fail) {
|
if (res.success) {
|
||||||
message.warning(`成功 ${ok}, 失败 ${fail}`);
|
message.success('批量删除成功');
|
||||||
} else {
|
} else {
|
||||||
message.success(`成功删除 ${ok} 条`);
|
message.warning(res.message || '部分删除失败');
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
,
|
||||||
|
<Button
|
||||||
|
onClick={async () => {
|
||||||
|
if (!siteId) return;
|
||||||
|
const res = await request(`/site-api/${siteId}/orders/export`, { params: {} });
|
||||||
|
if (res?.success && res?.data?.csv) {
|
||||||
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'orders.csv';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
} else {
|
||||||
|
message.error(res.message || '导出失败');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>批量导出</Button>,
|
||||||
|
<ModalForm
|
||||||
|
title="批量导入订单"
|
||||||
|
trigger={<Button type="primary" ghost>批量导入</Button>}
|
||||||
|
width={600}
|
||||||
|
modalProps={{ destroyOnHidden: true }}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
if (!siteId) return false;
|
||||||
|
const csv = values.csv || '';
|
||||||
|
const items = values.items || [];
|
||||||
|
const res = await request(`/site-api/${siteId}/orders/import`, { method: 'POST', data: { csv, items } });
|
||||||
|
if (res.success) {
|
||||||
|
message.success('导入完成');
|
||||||
|
actionRef.current?.reload();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
message.error(res.message || '导入失败');
|
||||||
|
return false;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProFormTextArea name="csv" label="CSV文本" placeholder="粘贴CSV,首行为表头" />
|
||||||
|
</ModalForm>
|
||||||
|
|
||||||
]}
|
]}
|
||||||
request={async ({ date, ...param }: any) => {
|
request={async ({ date, ...param }: any) => {
|
||||||
if (param.status === 'all') {
|
if (param.status === 'all') {
|
||||||
|
|
|
||||||
|
|
@ -172,48 +172,7 @@ const ProductsPage: React.FC = () => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const varColumns: ProColumns<any>[] = [
|
const varColumns: ProColumns<any>[] = [];
|
||||||
{
|
|
||||||
title: '变体名',
|
|
||||||
dataIndex: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'sku',
|
|
||||||
dataIndex: 'sku',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '常规价格',
|
|
||||||
dataIndex: 'regular_price',
|
|
||||||
hideInSearch: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '销售价格',
|
|
||||||
dataIndex: 'sale_price',
|
|
||||||
hideInSearch: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
dataIndex: 'option',
|
|
||||||
valueType: 'option',
|
|
||||||
render: (_, record) => (
|
|
||||||
<>
|
|
||||||
<UpdateVaritation tableRef={actionRef} values={record} siteId={siteId} />
|
|
||||||
{record.sku ? (
|
|
||||||
<>
|
|
||||||
<Divider type="vertical" />
|
|
||||||
<SetComponent
|
|
||||||
tableRef={actionRef}
|
|
||||||
values={record}
|
|
||||||
isProduct={false}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<></>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer header={{ title: null, breadcrumb: undefined }}>
|
<PageContainer header={{ title: null, breadcrumb: undefined }}>
|
||||||
|
|
@ -269,26 +228,67 @@ const ProductsPage: React.FC = () => {
|
||||||
setSelectedRowKeys={setSelectedRowKeys}
|
setSelectedRowKeys={setSelectedRowKeys}
|
||||||
selectedRows={selectedRows}
|
selectedRows={selectedRows}
|
||||||
config={config}
|
config={config}
|
||||||
|
siteId={siteId}
|
||||||
/>,
|
/>,
|
||||||
<BatchDeleteProducts
|
<BatchDeleteProducts
|
||||||
tableRef={actionRef}
|
tableRef={actionRef}
|
||||||
selectedRowKeys={selectedRowKeys}
|
selectedRowKeys={selectedRowKeys}
|
||||||
setSelectedRowKeys={setSelectedRowKeys}
|
setSelectedRowKeys={setSelectedRowKeys}
|
||||||
|
siteId={siteId}
|
||||||
/>,
|
/>,
|
||||||
<ImportCsv tableRef={actionRef} siteId={siteId} />,
|
<ImportCsv tableRef={actionRef} siteId={siteId} />,
|
||||||
|
<Button onClick={async () => {
|
||||||
|
const res = await request(`/site-api/${siteId}/products/export`);
|
||||||
|
if (res?.success && res?.data?.csv) {
|
||||||
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'products.csv';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}
|
||||||
|
}}>批量导出</Button>,
|
||||||
]}
|
]}
|
||||||
expandable={{
|
expandable={{
|
||||||
rowExpandable: (record) => record.type === 'variable',
|
rowExpandable: (record) => record.type === 'variable',
|
||||||
expandedRowRender: (record) => (
|
expandedRowRender: (record) => {
|
||||||
<ProTable<any>
|
const productExternalId = record.externalProductId || record.external_product_id || record.id;
|
||||||
rowKey="id"
|
const innerColumns: ProColumns<any>[] = [
|
||||||
dataSource={record.variations}
|
{ title: '变体名', dataIndex: 'name' },
|
||||||
pagination={false}
|
{ title: 'sku', dataIndex: 'sku' },
|
||||||
search={false}
|
{ title: '常规价格', dataIndex: 'regular_price', hideInSearch: true },
|
||||||
options={false}
|
{ title: '销售价格', dataIndex: 'sale_price', hideInSearch: true },
|
||||||
columns={varColumns}
|
{
|
||||||
/>
|
title: '操作',
|
||||||
),
|
dataIndex: 'option',
|
||||||
|
valueType: 'option',
|
||||||
|
render: (_, row) => (
|
||||||
|
<>
|
||||||
|
<UpdateVaritation tableRef={actionRef} values={row} siteId={siteId} productId={productExternalId} />
|
||||||
|
{row.sku ? (
|
||||||
|
<>
|
||||||
|
<Divider type="vertical" />
|
||||||
|
<SetComponent tableRef={actionRef} values={row} isProduct={false} />
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<ProTable<any>
|
||||||
|
rowKey="id"
|
||||||
|
dataSource={record.variations}
|
||||||
|
pagination={false}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
columns={innerColumns}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
|
|
|
||||||
|
|
@ -159,10 +159,26 @@ const SubscriptionsPage: React.FC = () => {
|
||||||
toolBarRender={() => [
|
toolBarRender={() => [
|
||||||
<Button type="primary" title="新增" icon={<PlusOutlined />} onClick={() => message.info('订阅新增未实现')} />,
|
<Button type="primary" title="新增" icon={<PlusOutlined />} onClick={() => message.info('订阅新增未实现')} />,
|
||||||
<Button title="批量编辑" icon={<EditOutlined />} onClick={() => message.info('批量编辑未实现')} />,
|
<Button title="批量编辑" icon={<EditOutlined />} onClick={() => message.info('批量编辑未实现')} />,
|
||||||
|
<Button
|
||||||
|
title="批量导出"
|
||||||
|
onClick={async () => {
|
||||||
|
if (!siteId) return;
|
||||||
|
const res = await request(`/site-api/${siteId}/subscriptions/export`, { params: {} });
|
||||||
|
if (res?.success && res?.data?.csv) {
|
||||||
|
const blob = new Blob([res.data.csv], { type: 'text/csv;charset=utf-8;' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'subscriptions.csv';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
} else {
|
||||||
|
message.error(res.message || '导出失败');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>,
|
||||||
<Button title="批量删除" danger icon={<DeleteFilled />} onClick={() => message.info('订阅删除未实现')} />
|
<Button title="批量删除" danger icon={<DeleteFilled />} onClick={() => message.info('订阅删除未实现')} />
|
||||||
]}
|
]}n />
|
||||||
/>
|
|
||||||
{/* 关联订单抽屉:展示订单号,关系,时间,状态与金额 */}
|
|
||||||
<Drawer
|
<Drawer
|
||||||
open={drawerOpen}
|
open={drawerOpen}
|
||||||
title={drawerTitle}
|
title={drawerTitle}
|
||||||
|
|
|
||||||
|
|
@ -511,7 +511,7 @@ export const UpdateVaritation: React.FC<{
|
||||||
destroyOnHidden: true,
|
destroyOnHidden: true,
|
||||||
}}
|
}}
|
||||||
onFinish={async (values) => {
|
onFinish={async (values) => {
|
||||||
const productId = propProductId || initialValues.parent_id || initialValues.product_id;
|
const productId = propProductId || initialValues.externalProductId || initialValues.parent_id || initialValues.product_id;
|
||||||
|
|
||||||
if (!siteId || !productId) {
|
if (!siteId || !productId) {
|
||||||
message.error('缺少站点ID或产品ID');
|
message.error('缺少站点ID或产品ID');
|
||||||
|
|
@ -527,7 +527,8 @@ export const UpdateVaritation: React.FC<{
|
||||||
price: values.sale_price?.toString() || values.regular_price?.toString() || '',
|
price: values.sale_price?.toString() || values.regular_price?.toString() || '',
|
||||||
};
|
};
|
||||||
|
|
||||||
await request(`/site-api/${siteId}/products/${productId}/variations/${initialValues.id}`, {
|
const variationId = initialValues.externalVariationId || initialValues.id;
|
||||||
|
await request(`/site-api/${siteId}/products/${productId}/variations/${variationId}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: variationData
|
data: variationData
|
||||||
});
|
});
|
||||||
|
|
@ -601,11 +602,12 @@ export const UpdateVaritation: React.FC<{
|
||||||
// I'll remove BatchEdit from ProductsPage toolbar for now or implement batch update in Controller.
|
// I'll remove BatchEdit from ProductsPage toolbar for now or implement batch update in Controller.
|
||||||
// I'll update BatchDelete.
|
// I'll update BatchDelete.
|
||||||
|
|
||||||
|
|
||||||
export const BatchDeleteProducts: React.FC<{
|
export const BatchDeleteProducts: React.FC<{
|
||||||
tableRef: React.MutableRefObject<ActionType | undefined>;
|
tableRef: React.MutableRefObject<ActionType | undefined>;
|
||||||
selectedRowKeys: React.Key[];
|
selectedRowKeys: React.Key[];
|
||||||
setSelectedRowKeys: (keys: React.Key[]) => void;
|
setSelectedRowKeys: (keys: React.Key[]) => void;
|
||||||
siteId?: string; // Need siteId
|
siteId?: string;
|
||||||
}> = ({ tableRef, selectedRowKeys, setSelectedRowKeys, siteId }) => {
|
}> = ({ tableRef, selectedRowKeys, setSelectedRowKeys, siteId }) => {
|
||||||
const { message, modal } = App.useApp();
|
const { message, modal } = App.useApp();
|
||||||
const hasSelection = selectedRowKeys && selectedRowKeys.length > 0;
|
const hasSelection = selectedRowKeys && selectedRowKeys.length > 0;
|
||||||
|
|
@ -617,22 +619,14 @@ export const BatchDeleteProducts: React.FC<{
|
||||||
content: `确定要删除选中的 ${selectedRowKeys.length} 个产品吗?`,
|
content: `确定要删除选中的 ${selectedRowKeys.length} 个产品吗?`,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
let successCount = 0;
|
const res = await request(`/site-api/${siteId}/products/batch`, {
|
||||||
let failCount = 0;
|
method: 'POST',
|
||||||
for (const key of selectedRowKeys) {
|
data: { delete: selectedRowKeys },
|
||||||
try {
|
});
|
||||||
await request(`/site-api/${siteId}/products/${key}`, { method: 'DELETE' });
|
if (res.success) {
|
||||||
successCount++;
|
message.success('批量删除成功');
|
||||||
} catch (e) {
|
|
||||||
failCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (failCount > 0) {
|
|
||||||
message.warning(
|
|
||||||
`删除完成: 成功 ${successCount} 个, 失败 ${failCount} 个`,
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
message.success(`成功删除 ${successCount} 个产品`);
|
message.warning(res.message || '部分删除失败');
|
||||||
}
|
}
|
||||||
tableRef.current?.reload();
|
tableRef.current?.reload();
|
||||||
setSelectedRowKeys([]);
|
setSelectedRowKeys([]);
|
||||||
|
|
@ -648,6 +642,91 @@ export const BatchDeleteProducts: React.FC<{
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BatchEditProducts: React.FC<any> = () => null; // Disable for now
|
|
||||||
|
export const BatchEditProducts: React.FC<{
|
||||||
|
tableRef: React.MutableRefObject<ActionType | undefined>;
|
||||||
|
selectedRowKeys: React.Key[];
|
||||||
|
setSelectedRowKeys: (keys: React.Key[]) => void;
|
||||||
|
selectedRows: any[];
|
||||||
|
siteId?: string;
|
||||||
|
}> = ({ tableRef, selectedRowKeys, setSelectedRowKeys, selectedRows, siteId }) => {
|
||||||
|
const { message } = App.useApp();
|
||||||
|
return (
|
||||||
|
<ModalForm
|
||||||
|
title="批量编辑产品"
|
||||||
|
trigger={<Button disabled={!selectedRowKeys.length} type="primary" icon={<EditOutlined />}>批量编辑</Button>}
|
||||||
|
width={600}
|
||||||
|
modalProps={{ destroyOnHidden: true }}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
if (!siteId) return false;
|
||||||
|
const updatePayload = selectedRows.map((row) => ({ id: row.id, ...values }));
|
||||||
|
try {
|
||||||
|
const res = await request(`/site-api/${siteId}/products/batch`, { method: 'POST', data: { update: updatePayload } });
|
||||||
|
if (res.success) {
|
||||||
|
message.success('批量编辑成功');
|
||||||
|
tableRef.current?.reload();
|
||||||
|
setSelectedRowKeys([]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
message.error(res.message || '批量编辑失败');
|
||||||
|
return false;
|
||||||
|
} catch (e: any) {
|
||||||
|
message.error(e.message || '批量编辑失败');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProForm.Group>
|
||||||
|
<ProFormSelect name="status" label="产品状态" valueEnum={PRODUCT_STATUS_ENUM} />
|
||||||
|
<ProFormSelect name="stock_status" label="库存状态" valueEnum={PRODUCT_STOCK_STATUS_ENUM} />
|
||||||
|
<ProFormDigit name="stock_quantity" label="库存数量" fieldProps={{ precision: 0 }} />
|
||||||
|
</ProForm.Group>
|
||||||
|
</ModalForm>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// Disable for now
|
||||||
export const SetComponent: React.FC<any> = () => null; // Disable for now (relies on local productcontrollerProductbysku?)
|
export const SetComponent: React.FC<any> = () => null; // Disable for now (relies on local productcontrollerProductbysku?)
|
||||||
export const ImportCsv: React.FC<any> = () => null; // Disable for now
|
|
||||||
|
export const ImportCsv: React.FC<{
|
||||||
|
tableRef: React.MutableRefObject<ActionType | undefined>;
|
||||||
|
siteId?: string;
|
||||||
|
}> = ({ tableRef, siteId }) => {
|
||||||
|
const { message } = App.useApp();
|
||||||
|
return (
|
||||||
|
<ModalForm
|
||||||
|
title="批量导入产品"
|
||||||
|
trigger={<Button type="primary" ghost icon={<PlusOutlined />}>批量导入</Button>}
|
||||||
|
width={600}
|
||||||
|
modalProps={{ destroyOnHidden: true }}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
if (!siteId) return false;
|
||||||
|
const csvText = values.csv || '';
|
||||||
|
const itemsList = values.items || [];
|
||||||
|
try {
|
||||||
|
const res = await request(`/site-api/${siteId}/products/import`, { method: 'POST', data: { csv: csvText, items: itemsList } });
|
||||||
|
if (res.success) {
|
||||||
|
message.success('导入完成');
|
||||||
|
tableRef.current?.reload();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
message.error(res.message || '导入失败');
|
||||||
|
return false;
|
||||||
|
} catch (e: any) {
|
||||||
|
message.error(e.message || '导入失败');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProFormTextArea name="csv" label="CSV文本" placeholder="粘贴CSV,首行为表头" />
|
||||||
|
<ProFormList name="items" label="或手动输入产品" initialValue={[]}>
|
||||||
|
<ProForm.Group>
|
||||||
|
<ProFormText name="name" label="名称" />
|
||||||
|
<ProFormText name="sku" label="SKU" />
|
||||||
|
<ProFormDigit name="regular_price" label="常规价" fieldProps={{ precision: 2 }} />
|
||||||
|
<ProFormDigit name="sale_price" label="促销价" fieldProps={{ precision: 2 }} />
|
||||||
|
</ProForm.Group>
|
||||||
|
</ProFormList>
|
||||||
|
</ModalForm>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
// Disable for now
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import {
|
||||||
} from '@/servers/api/product';
|
} from '@/servers/api/product';
|
||||||
import { sitecontrollerAll } from '@/servers/api/site';
|
import { sitecontrollerAll } from '@/servers/api/site';
|
||||||
import {
|
import {
|
||||||
wpproductcontrollerBatchUpdateProducts,
|
wpproductcontrollerBatchupdateproducts,
|
||||||
wpproductcontrollerGetwpproducts,
|
wpproductcontrollerGetwpproducts,
|
||||||
wpproductcontrollerImportProducts,
|
wpproductcontrollerImportproducts,
|
||||||
wpproductcontrollerSetconstitution,
|
wpproductcontrollerSetconstitution,
|
||||||
wpproductcontrollerSyncproducts,
|
wpproductcontrollerSyncproducts,
|
||||||
wpproductcontrollerUpdateproduct,
|
wpproductcontrollerUpdateproduct,
|
||||||
|
|
@ -1043,7 +1043,7 @@ const BatchEditProducts: React.FC<{
|
||||||
try {
|
try {
|
||||||
const ids = selectedRowKeys.map((key) => Number(key));
|
const ids = selectedRowKeys.map((key) => Number(key));
|
||||||
const { success, message: errMsg } =
|
const { success, message: errMsg } =
|
||||||
await wpproductcontrollerBatchUpdateProducts({
|
await wpproductcontrollerBatchupdateproducts({
|
||||||
ids,
|
ids,
|
||||||
...values,
|
...values,
|
||||||
});
|
});
|
||||||
|
|
@ -1126,7 +1126,7 @@ const ImportCsv: React.FC<{
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', values.file[0].originFileObj);
|
formData.append('file', values.file[0].originFileObj);
|
||||||
|
|
||||||
const { success, message: errMsg } = await wpproductcontrollerImportProducts(
|
const { success, message: errMsg } = await wpproductcontrollerImportproducts(
|
||||||
{ siteId: values.siteId },
|
{ siteId: values.siteId },
|
||||||
formData
|
formData
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,42 +2,12 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { request } from 'umi';
|
import { request } from 'umi';
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /customer/list */
|
/** 此处后端没有提供注释 POST /customer/addtag */
|
||||||
export async function customercontrollerGetcustomerlist(
|
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
||||||
params: API.customercontrollerGetcustomerlistParams,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<any>('/customer/list', {
|
|
||||||
method: 'GET',
|
|
||||||
params: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 PUT /customer/rate */
|
|
||||||
export async function customercontrollerSetrate(
|
|
||||||
body: Record<string, any>,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<API.BooleanRes>('/customer/rate', {
|
|
||||||
method: 'PUT',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'text/plain',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /customer/tag/add */
|
|
||||||
export async function customercontrollerAddtag(
|
export async function customercontrollerAddtag(
|
||||||
body: API.CustomerTagDTO,
|
body: API.CustomerTagDTO,
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
return request<API.BooleanRes>('/customer/tag/add', {
|
return request<Record<string, any>>('/customer/addtag', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
@ -47,13 +17,13 @@ export async function customercontrollerAddtag(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 DELETE /customer/tag/del */
|
/** 此处后端没有提供注释 POST /customer/deltag */
|
||||||
export async function customercontrollerDeltag(
|
export async function customercontrollerDeltag(
|
||||||
body: API.CustomerTagDTO,
|
body: API.CustomerTagDTO,
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
return request<API.BooleanRes>('/customer/tag/del', {
|
return request<Record<string, any>>('/customer/deltag', {
|
||||||
method: 'DELETE',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
|
|
@ -62,12 +32,42 @@ export async function customercontrollerDeltag(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /customer/tags */
|
/** 此处后端没有提供注释 GET /customer/getcustomerlist */
|
||||||
|
export async function customercontrollerGetcustomerlist(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.customercontrollerGetcustomerlistParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<Record<string, any>>('/customer/getcustomerlist', {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /customer/gettags */
|
||||||
export async function customercontrollerGettags(options?: {
|
export async function customercontrollerGettags(options?: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}) {
|
}) {
|
||||||
return request<any>('/customer/tags', {
|
return request<Record<string, any>>('/customer/gettags', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /customer/setrate */
|
||||||
|
export async function customercontrollerSetrate(
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<Record<string, any>>('/customer/setrate', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,18 @@
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as area from './area';
|
import * as area from './area';
|
||||||
import * as category from './category';
|
import * as category from './category';
|
||||||
import * as customer from './customer';
|
import * as customer from './customer';
|
||||||
import * as dict from './dict';
|
import * as dict from './dict';
|
||||||
import * as locales from './locales';
|
import * as locales from './locales';
|
||||||
import * as logistics from './logistics';
|
import * as logistics from './logistics';
|
||||||
|
import * as media from './media';
|
||||||
import * as order from './order';
|
import * as order from './order';
|
||||||
import * as product from './product';
|
import * as product from './product';
|
||||||
import * as site from './site';
|
import * as site from './site';
|
||||||
|
import * as siteApi from './siteApi';
|
||||||
import * as statistics from './statistics';
|
import * as statistics from './statistics';
|
||||||
import * as stock from './stock';
|
import * as stock from './stock';
|
||||||
import * as subscription from './subscription';
|
import * as subscription from './subscription';
|
||||||
|
|
@ -25,8 +27,10 @@ export default {
|
||||||
dict,
|
dict,
|
||||||
locales,
|
locales,
|
||||||
logistics,
|
logistics,
|
||||||
|
media,
|
||||||
order,
|
order,
|
||||||
product,
|
product,
|
||||||
|
siteApi,
|
||||||
site,
|
site,
|
||||||
statistics,
|
statistics,
|
||||||
stock,
|
stock,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import { request } from 'umi';
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 DELETE /media/${param0} */
|
||||||
|
export async function mediacontrollerDelete(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.mediacontrollerDeleteParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/media/${param0}`, {
|
||||||
|
method: 'DELETE',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /media/list */
|
||||||
|
export async function mediacontrollerList(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.mediacontrollerListParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<any>('/media/list', {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /media/update/${param0} */
|
||||||
|
export async function mediacontrollerUpdate(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.mediacontrollerUpdateParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/media/update/${param0}`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /media/upload */
|
||||||
|
export async function mediacontrollerUpload(
|
||||||
|
body: {},
|
||||||
|
files?: File[],
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
if (files) {
|
||||||
|
files.forEach((f) => formData.append('files', f || ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.keys(body).forEach((ele) => {
|
||||||
|
const item = (body as any)[ele];
|
||||||
|
|
||||||
|
if (item !== undefined && item !== null) {
|
||||||
|
if (typeof item === 'object' && !(item instanceof File)) {
|
||||||
|
if (item instanceof Array) {
|
||||||
|
item.forEach((f) => formData.append(ele, f || ''));
|
||||||
|
} else {
|
||||||
|
formData.append(
|
||||||
|
ele,
|
||||||
|
new Blob([JSON.stringify(item)], { type: 'application/json' }),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
formData.append(ele, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return request<any>('/media/upload', {
|
||||||
|
method: 'POST',
|
||||||
|
data: formData,
|
||||||
|
requestType: 'form',
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -36,36 +36,6 @@ export async function productcontrollerUpdateproduct(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 PUT /product/batch-update */
|
|
||||||
export async function productcontrollerBatchupdateproduct(
|
|
||||||
body: API.BatchUpdateProductDTO,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<API.BooleanRes>('/product/batch-update', {
|
|
||||||
method: 'PUT',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /product/batch-delete */
|
|
||||||
export async function productcontrollerBatchdeleteproduct(
|
|
||||||
body: { ids: number[] },
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<API.BooleanRes>('/product/batch-delete', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 DELETE /product/${param0} */
|
/** 此处后端没有提供注释 DELETE /product/${param0} */
|
||||||
export async function productcontrollerDeleteproduct(
|
export async function productcontrollerDeleteproduct(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
@ -94,25 +64,6 @@ export async function productcontrollerGetproductcomponents(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /product/${param0}/components */
|
|
||||||
export async function productcontrollerSetproductcomponents(
|
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
||||||
params: API.productcontrollerSetproductcomponentsParams,
|
|
||||||
body: API.SetProductComponentsDTO,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
const { id: param0, ...queryParams } = params;
|
|
||||||
return request<any>(`/product/${param0}/components`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
params: { ...queryParams },
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /product/${param0}/components/auto */
|
/** 此处后端没有提供注释 POST /product/${param0}/components/auto */
|
||||||
export async function productcontrollerAutobindcomponents(
|
export async function productcontrollerAutobindcomponents(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
@ -127,6 +78,39 @@ export async function productcontrollerAutobindcomponents(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /product/${param0}/site-skus */
|
||||||
|
export async function productcontrollerGetproductsiteskus(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.productcontrollerGetproductsiteskusParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/product/${param0}/site-skus`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /product/${param0}/site-skus */
|
||||||
|
export async function productcontrollerBindproductsiteskus(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.productcontrollerBindproductsiteskusParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/product/${param0}/site-skus`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /product/attribute */
|
/** 此处后端没有提供注释 GET /product/attribute */
|
||||||
export async function productcontrollerGetattributelist(
|
export async function productcontrollerGetattributelist(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
@ -216,6 +200,36 @@ export async function productcontrollerGetattributeall(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /product/batch-delete */
|
||||||
|
export async function productcontrollerBatchdeleteproduct(
|
||||||
|
body: API.BatchDeleteProductDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.BooleanRes>('/product/batch-delete', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /product/batch-update */
|
||||||
|
export async function productcontrollerBatchupdateproduct(
|
||||||
|
body: API.BatchUpdateProductDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.BooleanRes>('/product/batch-update', {
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /product/brand */
|
/** 此处后端没有提供注释 POST /product/brand */
|
||||||
export async function productcontrollerCompatcreatebrand(
|
export async function productcontrollerCompatcreatebrand(
|
||||||
body: Record<string, any>,
|
body: Record<string, any>,
|
||||||
|
|
@ -718,6 +732,16 @@ export async function productcontrollerCompatstrengthall(options?: {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /product/sync-stock */
|
||||||
|
export async function productcontrollerSyncstocktoproduct(options?: {
|
||||||
|
[key: string]: any;
|
||||||
|
}) {
|
||||||
|
return request<any>('/product/sync-stock', {
|
||||||
|
method: 'POST',
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /product/wp-products */
|
/** 此处后端没有提供注释 GET /product/wp-products */
|
||||||
export async function productcontrollerGetwpproducts(options?: {
|
export async function productcontrollerGetwpproducts(options?: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,658 @@
|
||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import { request } from 'umi';
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/customers */
|
||||||
|
export async function siteapicontrollerGetcustomers(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetcustomersParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedCustomerPaginationDTO>(
|
||||||
|
`/site-api/${param0}/customers`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/customers */
|
||||||
|
export async function siteapicontrollerCreatecustomer(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerCreatecustomerParams,
|
||||||
|
body: API.UnifiedCustomerDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedCustomerDTO>(`/site-api/${param0}/customers`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/customers/batch */
|
||||||
|
export async function siteapicontrollerBatchcustomers(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerBatchcustomersParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/customers/batch`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/customers/export */
|
||||||
|
export async function siteapicontrollerExportcustomers(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportcustomersParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/customers/export`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/customers/import */
|
||||||
|
export async function siteapicontrollerImportcustomers(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerImportcustomersParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/customers/import`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/media */
|
||||||
|
export async function siteapicontrollerGetmedia(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetmediaParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedMediaPaginationDTO>(`/site-api/${param0}/media`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/media/batch */
|
||||||
|
export async function siteapicontrollerBatchmedia(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerBatchmediaParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/media/batch`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/media/export */
|
||||||
|
export async function siteapicontrollerExportmedia(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportmediaParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/media/export`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/orders */
|
||||||
|
export async function siteapicontrollerGetorders(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetordersParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedOrderPaginationDTO>(`/site-api/${param0}/orders`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/orders */
|
||||||
|
export async function siteapicontrollerCreateorder(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerCreateorderParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedOrderDTO>(`/site-api/${param0}/orders`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/orders/batch */
|
||||||
|
export async function siteapicontrollerBatchorders(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerBatchordersParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/orders/batch`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/orders/export */
|
||||||
|
export async function siteapicontrollerExportorders(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportordersParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/orders/export`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/orders/import */
|
||||||
|
export async function siteapicontrollerImportorders(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerImportordersParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/orders/import`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/products */
|
||||||
|
export async function siteapicontrollerGetproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetproductsParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedProductPaginationDTO>(
|
||||||
|
`/site-api/${param0}/products`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/products */
|
||||||
|
export async function siteapicontrollerCreateproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerCreateproductParams,
|
||||||
|
body: API.UnifiedProductDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedProductDTO>(`/site-api/${param0}/products`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/products/batch */
|
||||||
|
export async function siteapicontrollerBatchproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerBatchproductsParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/products/batch`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/products/export */
|
||||||
|
export async function siteapicontrollerExportproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportproductsParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/products/export`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/products/export-special */
|
||||||
|
export async function siteapicontrollerExportproductsspecial(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportproductsspecialParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/products/export-special`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/products/import */
|
||||||
|
export async function siteapicontrollerImportproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerImportproductsParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param0}/products/import`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param0}/products/import-special */
|
||||||
|
export async function siteapicontrollerImportproductsspecial(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerImportproductsspecialParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param0}/products/import-special`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/subscriptions */
|
||||||
|
export async function siteapicontrollerGetsubscriptions(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetsubscriptionsParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedSubscriptionPaginationDTO>(
|
||||||
|
`/site-api/${param0}/subscriptions`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param0}/subscriptions/export */
|
||||||
|
export async function siteapicontrollerExportsubscriptions(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerExportsubscriptionsParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<any>(`/site-api/${param0}/subscriptions/export`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
...queryParams,
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param1}/customers/${param0} */
|
||||||
|
export async function siteapicontrollerGetcustomer(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetcustomerParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedCustomerDTO>(
|
||||||
|
`/site-api/${param1}/customers/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /site-api/${param1}/customers/${param0} */
|
||||||
|
export async function siteapicontrollerUpdatecustomer(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerUpdatecustomerParams,
|
||||||
|
body: API.UnifiedCustomerDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedCustomerDTO>(
|
||||||
|
`/site-api/${param1}/customers/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 DELETE /site-api/${param1}/customers/${param0} */
|
||||||
|
export async function siteapicontrollerDeletecustomer(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerDeletecustomerParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param1}/customers/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'DELETE',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /site-api/${param1}/media/${param0} */
|
||||||
|
export async function siteapicontrollerUpdatemedia(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerUpdatemediaParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param1}/media/${param0}`, {
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 DELETE /site-api/${param1}/media/${param0} */
|
||||||
|
export async function siteapicontrollerDeletemedia(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerDeletemediaParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param1}/media/${param0}`, {
|
||||||
|
method: 'DELETE',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param1}/orders/${param0} */
|
||||||
|
export async function siteapicontrollerGetorder(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetorderParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedOrderDTO>(`/site-api/${param1}/orders/${param0}`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /site-api/${param1}/orders/${param0} */
|
||||||
|
export async function siteapicontrollerUpdateorder(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerUpdateorderParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param1}/orders/${param0}`, {
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 DELETE /site-api/${param1}/orders/${param0} */
|
||||||
|
export async function siteapicontrollerDeleteorder(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerDeleteorderParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(`/site-api/${param1}/orders/${param0}`, {
|
||||||
|
method: 'DELETE',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param1}/orders/${param0}/notes */
|
||||||
|
export async function siteapicontrollerGetordernotes(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetordernotesParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param1}/orders/${param0}/notes`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /site-api/${param1}/orders/${param0}/notes */
|
||||||
|
export async function siteapicontrollerCreateordernote(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerCreateordernoteParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param1}/orders/${param0}/notes`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 GET /site-api/${param1}/products/${param0} */
|
||||||
|
export async function siteapicontrollerGetproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerGetproductParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedProductDTO>(
|
||||||
|
`/site-api/${param1}/products/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /site-api/${param1}/products/${param0} */
|
||||||
|
export async function siteapicontrollerUpdateproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerUpdateproductParams,
|
||||||
|
body: API.UnifiedProductDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<API.UnifiedProductDTO>(
|
||||||
|
`/site-api/${param1}/products/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 DELETE /site-api/${param1}/products/${param0} */
|
||||||
|
export async function siteapicontrollerDeleteproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerDeleteproductParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, siteId: param1, ...queryParams } = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param1}/products/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'DELETE',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 PUT /site-api/${param2}/products/${param1}/variations/${param0} */
|
||||||
|
export async function siteapicontrollerUpdatevariation(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.siteapicontrollerUpdatevariationParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const {
|
||||||
|
variationId: param0,
|
||||||
|
productId: param1,
|
||||||
|
siteId: param2,
|
||||||
|
...queryParams
|
||||||
|
} = params;
|
||||||
|
return request<Record<string, any>>(
|
||||||
|
`/site-api/${param2}/products/${param1}/variations/${param0}`,
|
||||||
|
{
|
||||||
|
method: 'PUT',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -64,6 +64,16 @@ export async function templatecontrollerDeletetemplate(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /template/backfill-testdata */
|
||||||
|
export async function templatecontrollerBackfilltestdata(options?: {
|
||||||
|
[key: string]: any;
|
||||||
|
}) {
|
||||||
|
return request<Record<string, any>>('/template/backfill-testdata', {
|
||||||
|
method: 'POST',
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /template/list */
|
/** 此处后端没有提供注释 GET /template/list */
|
||||||
export async function templatecontrollerGettemplatelist(options?: {
|
export async function templatecontrollerGettemplatelist(options?: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
|
|
|
||||||
|
|
@ -14,20 +14,6 @@ declare namespace API {
|
||||||
code?: string;
|
code?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type BatchUpdateProductDTO = {
|
|
||||||
ids: number[];
|
|
||||||
name?: string;
|
|
||||||
nameCn?: string;
|
|
||||||
description?: string;
|
|
||||||
shortDescription?: string;
|
|
||||||
sku?: string;
|
|
||||||
categoryId?: number;
|
|
||||||
attributes?: any[];
|
|
||||||
price?: number;
|
|
||||||
promotionPrice?: number;
|
|
||||||
type?: 'single' | 'bundle';
|
|
||||||
};
|
|
||||||
|
|
||||||
type areacontrollerDeleteareaParams = {
|
type areacontrollerDeleteareaParams = {
|
||||||
id: number;
|
id: number;
|
||||||
};
|
};
|
||||||
|
|
@ -49,6 +35,73 @@ declare namespace API {
|
||||||
id: number;
|
id: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type BatchDeleteProductDTO = {
|
||||||
|
/** 产品ID列表 */
|
||||||
|
ids: any[];
|
||||||
|
};
|
||||||
|
|
||||||
|
type BatchSyncProductsDTO = {
|
||||||
|
/** 产品ID列表 */
|
||||||
|
productIds?: number[];
|
||||||
|
};
|
||||||
|
|
||||||
|
type BatchUpdateProductDTO = {
|
||||||
|
/** 产品ID列表 */
|
||||||
|
ids: any[];
|
||||||
|
/** 产品名称 */
|
||||||
|
name?: string;
|
||||||
|
/** 产品中文名称 */
|
||||||
|
nameCn?: string;
|
||||||
|
/** 产品描述 */
|
||||||
|
description?: string;
|
||||||
|
/** 产品简短描述 */
|
||||||
|
shortDescription?: string;
|
||||||
|
/** 产品 SKU */
|
||||||
|
sku?: string;
|
||||||
|
/** 分类ID (DictItem ID) */
|
||||||
|
categoryId?: number;
|
||||||
|
/** 站点 SKU 列表 */
|
||||||
|
siteSkus?: any[];
|
||||||
|
/** 价格 */
|
||||||
|
price?: number;
|
||||||
|
/** 促销价格 */
|
||||||
|
promotionPrice?: number;
|
||||||
|
/** 属性列表 */
|
||||||
|
attributes?: any[];
|
||||||
|
/** 商品类型 */
|
||||||
|
type?: 'single' | 'bundle';
|
||||||
|
};
|
||||||
|
|
||||||
|
type BatchUpdateProductsDTO = {
|
||||||
|
/** 产品ID列表 */
|
||||||
|
ids?: number[];
|
||||||
|
/** 常规价格 */
|
||||||
|
regular_price?: number;
|
||||||
|
/** 销售价格 */
|
||||||
|
sale_price?: number;
|
||||||
|
/** 分类列表 */
|
||||||
|
categories?: string[];
|
||||||
|
/** 标签列表 */
|
||||||
|
tags?: string[];
|
||||||
|
/** 状态 */
|
||||||
|
status?:
|
||||||
|
| 'publish'
|
||||||
|
| 'draft'
|
||||||
|
| 'pending'
|
||||||
|
| 'private'
|
||||||
|
| 'trash'
|
||||||
|
| 'auto-draft'
|
||||||
|
| 'future'
|
||||||
|
| 'inherit';
|
||||||
|
};
|
||||||
|
|
||||||
|
type BatchUpdateTagsDTO = {
|
||||||
|
/** 产品ID列表 */
|
||||||
|
ids?: number[];
|
||||||
|
/** 标签列表 */
|
||||||
|
tags?: string[];
|
||||||
|
};
|
||||||
|
|
||||||
type BooleanRes = {
|
type BooleanRes = {
|
||||||
/** 状态码 */
|
/** 状态码 */
|
||||||
code?: number;
|
code?: number;
|
||||||
|
|
@ -99,6 +152,8 @@ declare namespace API {
|
||||||
type CreateProductDTO = {
|
type CreateProductDTO = {
|
||||||
/** 产品名称 */
|
/** 产品名称 */
|
||||||
name: string;
|
name: string;
|
||||||
|
/** 产品中文名称 */
|
||||||
|
nameCn?: string;
|
||||||
/** 产品描述 */
|
/** 产品描述 */
|
||||||
description?: string;
|
description?: string;
|
||||||
/** 产品简短描述 */
|
/** 产品简短描述 */
|
||||||
|
|
@ -107,6 +162,8 @@ declare namespace API {
|
||||||
sku?: string;
|
sku?: string;
|
||||||
/** 分类ID (DictItem ID) */
|
/** 分类ID (DictItem ID) */
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
|
/** 站点 SKU 列表 */
|
||||||
|
siteSkus?: any[];
|
||||||
/** 属性列表 */
|
/** 属性列表 */
|
||||||
attributes?: any[];
|
attributes?: any[];
|
||||||
/** 价格 */
|
/** 价格 */
|
||||||
|
|
@ -114,11 +171,9 @@ declare namespace API {
|
||||||
/** 促销价格 */
|
/** 促销价格 */
|
||||||
promotionPrice?: number;
|
promotionPrice?: number;
|
||||||
/** 商品类型 */
|
/** 商品类型 */
|
||||||
type?: 'simple' | 'bundle';
|
type?: 'single' | 'bundle';
|
||||||
/** 产品组成 */
|
/** 产品组成 */
|
||||||
components?: any[];
|
components?: any[];
|
||||||
/** 站点 SKU 列表 */
|
|
||||||
siteSkus?: string[];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type CreatePurchaseOrderDTO = {
|
type CreatePurchaseOrderDTO = {
|
||||||
|
|
@ -132,6 +187,8 @@ declare namespace API {
|
||||||
type CreateSiteDTO = {
|
type CreateSiteDTO = {
|
||||||
/** 区域 */
|
/** 区域 */
|
||||||
areas?: any;
|
areas?: any;
|
||||||
|
/** 绑定仓库ID列表 */
|
||||||
|
stockPointIds?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
type CreateStockPointDTO = {
|
type CreateStockPointDTO = {
|
||||||
|
|
@ -141,6 +198,10 @@ declare namespace API {
|
||||||
contactPhone?: string;
|
contactPhone?: string;
|
||||||
/** 区域 */
|
/** 区域 */
|
||||||
areas?: any;
|
areas?: any;
|
||||||
|
/** 上游仓库点ID */
|
||||||
|
upStreamStockPointId?: number;
|
||||||
|
/** 上游名称 */
|
||||||
|
upStreamName?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type CreateTemplateDTO = {
|
type CreateTemplateDTO = {
|
||||||
|
|
@ -308,6 +369,22 @@ declare namespace API {
|
||||||
weight?: Cubid;
|
weight?: Cubid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type mediacontrollerDeleteParams = {
|
||||||
|
force?: boolean;
|
||||||
|
siteId?: number;
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type mediacontrollerListParams = {
|
||||||
|
pageSize?: number;
|
||||||
|
page?: number;
|
||||||
|
siteId?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type mediacontrollerUpdateParams = {
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
type Money = {
|
type Money = {
|
||||||
currency?: string;
|
currency?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|
@ -754,12 +831,10 @@ declare namespace API {
|
||||||
price?: number;
|
price?: number;
|
||||||
/** 促销价格 */
|
/** 促销价格 */
|
||||||
promotionPrice?: number;
|
promotionPrice?: number;
|
||||||
/** 库存 */
|
|
||||||
stock?: number;
|
|
||||||
/** 库存组成 */
|
/** 库存组成 */
|
||||||
components?: ProductStockComponent[];
|
components?: ProductStockComponent[];
|
||||||
/** 站点 SKU 列表 */
|
/** 站点 SKU 列表 */
|
||||||
siteSkus?: { code: string }[];
|
siteSkus?: ProductSiteSku[];
|
||||||
/** 来源 */
|
/** 来源 */
|
||||||
source?: number;
|
source?: number;
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
|
|
@ -772,6 +847,10 @@ declare namespace API {
|
||||||
id: number;
|
id: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type productcontrollerBindproductsiteskusParams = {
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
type productcontrollerCompatbrandsParams = {
|
type productcontrollerCompatbrandsParams = {
|
||||||
name?: string;
|
name?: string;
|
||||||
pageSize?: Record<string, any>;
|
pageSize?: Record<string, any>;
|
||||||
|
|
@ -878,6 +957,14 @@ declare namespace API {
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
/** 品牌ID */
|
/** 品牌ID */
|
||||||
brandId?: number;
|
brandId?: number;
|
||||||
|
/** 排序字段 */
|
||||||
|
sortField?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
sortOrder?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type productcontrollerGetproductsiteskusParams = {
|
||||||
|
id: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
type productcontrollerProductbyskuParams = {
|
type productcontrollerProductbyskuParams = {
|
||||||
|
|
@ -888,10 +975,6 @@ declare namespace API {
|
||||||
name?: string;
|
name?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type productcontrollerSetproductcomponentsParams = {
|
|
||||||
id: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
type productcontrollerUpdateattributeParams = {
|
type productcontrollerUpdateattributeParams = {
|
||||||
dictName?: string;
|
dictName?: string;
|
||||||
id: number;
|
id: number;
|
||||||
|
|
@ -943,6 +1026,11 @@ declare namespace API {
|
||||||
data?: Product;
|
data?: Product;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type ProductSiteSku = {
|
||||||
|
/** 站点 SKU */
|
||||||
|
code?: string;
|
||||||
|
};
|
||||||
|
|
||||||
type ProductsRes = {
|
type ProductsRes = {
|
||||||
/** 状态码 */
|
/** 状态码 */
|
||||||
code?: number;
|
code?: number;
|
||||||
|
|
@ -1108,6 +1196,10 @@ declare namespace API {
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
/** 品牌ID */
|
/** 品牌ID */
|
||||||
brandId?: number;
|
brandId?: number;
|
||||||
|
/** 排序字段 */
|
||||||
|
sortField?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
sortOrder?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type QueryPurchaseOrderDTO = {
|
type QueryPurchaseOrderDTO = {
|
||||||
|
|
@ -1196,6 +1288,8 @@ declare namespace API {
|
||||||
| 'auto-draft'
|
| 'auto-draft'
|
||||||
| 'future'
|
| 'future'
|
||||||
| 'inherit';
|
| 'inherit';
|
||||||
|
/** SKU列表 */
|
||||||
|
skus?: any[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type RateDTO = {
|
type RateDTO = {
|
||||||
|
|
@ -1244,17 +1338,6 @@ declare namespace API {
|
||||||
data?: Service[];
|
data?: Service[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type SetConstitutionDTO = {
|
|
||||||
isProduct?: boolean;
|
|
||||||
/** 构成成分 */
|
|
||||||
constitution?: { sku?: string; quantity?: number }[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type SetProductComponentsDTO = {
|
|
||||||
/** 产品组成 */
|
|
||||||
components: any[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type ShipmentBookDTO = {
|
type ShipmentBookDTO = {
|
||||||
sales?: OrderSale[];
|
sales?: OrderSale[];
|
||||||
details?: ShippingDetailsDTO;
|
details?: ShippingDetailsDTO;
|
||||||
|
|
@ -1320,6 +1403,299 @@ declare namespace API {
|
||||||
reference_codes?: any;
|
reference_codes?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type Site = {};
|
||||||
|
|
||||||
|
type siteapicontrollerBatchcustomersParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerBatchmediaParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerBatchordersParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerBatchproductsParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerCreatecustomerParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerCreateordernoteParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerCreateorderParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerCreateproductParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerDeletecustomerParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerDeletemediaParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerDeleteorderParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerDeleteproductParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportcustomersParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportmediaParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportordersParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportproductsParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportproductsspecialParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerExportsubscriptionsParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetcustomerParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetcustomersParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetmediaParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetordernotesParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetorderParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetordersParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetproductParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetproductsParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerGetsubscriptionsParams = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerImportcustomersParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerImportordersParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerImportproductsParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerImportproductsspecialParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerUpdatecustomerParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerUpdatemediaParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerUpdateorderParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerUpdateproductParams = {
|
||||||
|
id: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type siteapicontrollerUpdatevariationParams = {
|
||||||
|
variationId: string;
|
||||||
|
productId: string;
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
type SiteConfig = {
|
type SiteConfig = {
|
||||||
/** 站点 ID */
|
/** 站点 ID */
|
||||||
id?: string;
|
id?: string;
|
||||||
|
|
@ -1331,6 +1707,8 @@ declare namespace API {
|
||||||
consumerSecret?: string;
|
consumerSecret?: string;
|
||||||
/** 站点名 */
|
/** 站点名 */
|
||||||
name?: string;
|
name?: string;
|
||||||
|
/** 描述 */
|
||||||
|
description?: string;
|
||||||
/** 平台类型 */
|
/** 平台类型 */
|
||||||
type?: 'woocommerce' | 'shopyy';
|
type?: 'woocommerce' | 'shopyy';
|
||||||
/** SKU 前缀 */
|
/** SKU 前缀 */
|
||||||
|
|
@ -1643,6 +2021,7 @@ declare namespace API {
|
||||||
name?: string;
|
name?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
/** 测试数据JSON */
|
||||||
testData?: string;
|
testData?: string;
|
||||||
/** 是否可删除 */
|
/** 是否可删除 */
|
||||||
deletable: boolean;
|
deletable: boolean;
|
||||||
|
|
@ -1673,6 +2052,230 @@ declare namespace API {
|
||||||
minute?: string;
|
minute?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type UnifiedCustomerDTO = {
|
||||||
|
/** 客户ID */
|
||||||
|
id?: Record<string, any>;
|
||||||
|
/** 邮箱 */
|
||||||
|
email?: string;
|
||||||
|
/** 名 */
|
||||||
|
first_name?: string;
|
||||||
|
/** 姓 */
|
||||||
|
last_name?: string;
|
||||||
|
/** 名字 */
|
||||||
|
fullname?: string;
|
||||||
|
/** 用户名 */
|
||||||
|
username?: string;
|
||||||
|
/** 电话 */
|
||||||
|
phone?: string;
|
||||||
|
/** 账单地址 */
|
||||||
|
billing?: any;
|
||||||
|
/** 收货地址 */
|
||||||
|
shipping?: any;
|
||||||
|
/** 原始数据 */
|
||||||
|
raw?: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedCustomerPaginationDTO = {
|
||||||
|
/** 列表数据 */
|
||||||
|
items?: UnifiedCustomerDTO[];
|
||||||
|
/** 总数 */
|
||||||
|
total?: number;
|
||||||
|
/** 当前页 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 总页数 */
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedImageDTO = {
|
||||||
|
/** 图片ID */
|
||||||
|
id?: Record<string, any>;
|
||||||
|
/** 图片URL */
|
||||||
|
src?: string;
|
||||||
|
/** 图片名称 */
|
||||||
|
name?: string;
|
||||||
|
/** 替代文本 */
|
||||||
|
alt?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedMediaDTO = {
|
||||||
|
/** 媒体ID */
|
||||||
|
id?: number;
|
||||||
|
/** 标题 */
|
||||||
|
title?: string;
|
||||||
|
/** 媒体类型 */
|
||||||
|
media_type?: string;
|
||||||
|
/** MIME类型 */
|
||||||
|
mime_type?: string;
|
||||||
|
/** 源URL */
|
||||||
|
source_url?: string;
|
||||||
|
/** 创建时间 */
|
||||||
|
date_created?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedMediaPaginationDTO = {
|
||||||
|
/** 列表数据 */
|
||||||
|
items?: UnifiedMediaDTO[];
|
||||||
|
/** 总数 */
|
||||||
|
total?: number;
|
||||||
|
/** 当前页 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 总页数 */
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedOrderDTO = {
|
||||||
|
/** 订单ID */
|
||||||
|
id?: Record<string, any>;
|
||||||
|
/** 订单号 */
|
||||||
|
number?: string;
|
||||||
|
/** 订单状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 货币 */
|
||||||
|
currency?: string;
|
||||||
|
/** 总金额 */
|
||||||
|
total?: string;
|
||||||
|
/** 客户ID */
|
||||||
|
customer_id?: number;
|
||||||
|
/** 客户姓名 */
|
||||||
|
customer_name?: string;
|
||||||
|
/** 客户邮箱 */
|
||||||
|
email?: string;
|
||||||
|
/** 订单项 */
|
||||||
|
line_items?: any;
|
||||||
|
/** 销售项(兼容前端) */
|
||||||
|
sales?: any;
|
||||||
|
/** 账单地址 */
|
||||||
|
billing?: any;
|
||||||
|
/** 收货地址 */
|
||||||
|
shipping?: any;
|
||||||
|
/** 账单地址全称 */
|
||||||
|
billing_full_address?: string;
|
||||||
|
/** 收货地址全称 */
|
||||||
|
shipping_full_address?: string;
|
||||||
|
/** 支付方式 */
|
||||||
|
payment_method?: string;
|
||||||
|
/** 创建时间 */
|
||||||
|
date_created?: string;
|
||||||
|
/** 原始数据 */
|
||||||
|
raw?: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedOrderPaginationDTO = {
|
||||||
|
/** 列表数据 */
|
||||||
|
items?: UnifiedOrderDTO[];
|
||||||
|
/** 总数 */
|
||||||
|
total?: number;
|
||||||
|
/** 当前页 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 总页数 */
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedProductDTO = {
|
||||||
|
/** 产品ID */
|
||||||
|
id?: Record<string, any>;
|
||||||
|
/** 产品名称 */
|
||||||
|
name?: string;
|
||||||
|
/** 产品类型 */
|
||||||
|
type?: string;
|
||||||
|
/** 产品状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 产品SKU */
|
||||||
|
sku?: string;
|
||||||
|
/** 常规价格 */
|
||||||
|
regular_price?: string;
|
||||||
|
/** 销售价格 */
|
||||||
|
sale_price?: string;
|
||||||
|
/** 当前价格 */
|
||||||
|
price?: string;
|
||||||
|
/** 库存状态 */
|
||||||
|
stock_status?: string;
|
||||||
|
/** 库存数量 */
|
||||||
|
stock_quantity?: number;
|
||||||
|
/** 产品图片 */
|
||||||
|
images?: UnifiedImageDTO[];
|
||||||
|
/** 产品标签 */
|
||||||
|
tags?: any;
|
||||||
|
/** 产品属性 */
|
||||||
|
attributes?: any;
|
||||||
|
/** 产品变体 */
|
||||||
|
variations?: any;
|
||||||
|
/** 创建时间 */
|
||||||
|
date_created?: string;
|
||||||
|
/** 更新时间 */
|
||||||
|
date_modified?: string;
|
||||||
|
/** 原始数据(保留备用) */
|
||||||
|
raw?: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedProductPaginationDTO = {
|
||||||
|
/** 列表数据 */
|
||||||
|
items?: UnifiedProductDTO[];
|
||||||
|
/** 总数 */
|
||||||
|
total?: number;
|
||||||
|
/** 当前页 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 总页数 */
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedSearchParamsDTO = {
|
||||||
|
/** 页码 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 搜索关键词 */
|
||||||
|
search?: string;
|
||||||
|
/** 状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 排序字段 */
|
||||||
|
orderby?: string;
|
||||||
|
/** 排序方式 */
|
||||||
|
order?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedSubscriptionDTO = {
|
||||||
|
/** 订阅ID */
|
||||||
|
id?: Record<string, any>;
|
||||||
|
/** 订阅状态 */
|
||||||
|
status?: string;
|
||||||
|
/** 客户ID */
|
||||||
|
customer_id?: number;
|
||||||
|
/** 计费周期 */
|
||||||
|
billing_period?: string;
|
||||||
|
/** 计费间隔 */
|
||||||
|
billing_interval?: number;
|
||||||
|
/** 开始时间 */
|
||||||
|
start_date?: string;
|
||||||
|
/** 下次支付时间 */
|
||||||
|
next_payment_date?: string;
|
||||||
|
/** 订单项 */
|
||||||
|
line_items?: any;
|
||||||
|
/** 原始数据 */
|
||||||
|
raw?: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UnifiedSubscriptionPaginationDTO = {
|
||||||
|
/** 列表数据 */
|
||||||
|
items?: UnifiedSubscriptionDTO[];
|
||||||
|
/** 总数 */
|
||||||
|
total?: number;
|
||||||
|
/** 当前页 */
|
||||||
|
page?: number;
|
||||||
|
/** 每页数量 */
|
||||||
|
per_page?: number;
|
||||||
|
/** 总页数 */
|
||||||
|
totalPages?: number;
|
||||||
|
};
|
||||||
|
|
||||||
type UpdateAreaDTO = {
|
type UpdateAreaDTO = {
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
code?: string;
|
code?: string;
|
||||||
|
|
@ -1695,6 +2298,8 @@ declare namespace API {
|
||||||
sku?: string;
|
sku?: string;
|
||||||
/** 分类ID (DictItem ID) */
|
/** 分类ID (DictItem ID) */
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
|
/** 站点 SKU 列表 */
|
||||||
|
siteSkus?: any[];
|
||||||
/** 价格 */
|
/** 价格 */
|
||||||
price?: number;
|
price?: number;
|
||||||
/** 促销价格 */
|
/** 促销价格 */
|
||||||
|
|
@ -1702,9 +2307,9 @@ declare namespace API {
|
||||||
/** 属性列表 */
|
/** 属性列表 */
|
||||||
attributes?: any[];
|
attributes?: any[];
|
||||||
/** 商品类型 */
|
/** 商品类型 */
|
||||||
type?: 'simple' | 'bundle';
|
type?: 'single' | 'bundle';
|
||||||
/** 站点 SKU 列表 */
|
/** 产品组成 */
|
||||||
siteSkus?: string[];
|
components?: any[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type UpdatePurchaseOrderDTO = {
|
type UpdatePurchaseOrderDTO = {
|
||||||
|
|
@ -1718,6 +2323,8 @@ declare namespace API {
|
||||||
type UpdateSiteDTO = {
|
type UpdateSiteDTO = {
|
||||||
/** 区域 */
|
/** 区域 */
|
||||||
areas?: any;
|
areas?: any;
|
||||||
|
/** 绑定仓库ID列表 */
|
||||||
|
stockPointIds?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
type UpdateStockDTO = {
|
type UpdateStockDTO = {
|
||||||
|
|
@ -1736,6 +2343,10 @@ declare namespace API {
|
||||||
contactPhone?: string;
|
contactPhone?: string;
|
||||||
/** 区域 */
|
/** 区域 */
|
||||||
areas?: any;
|
areas?: any;
|
||||||
|
/** 上游仓库点ID */
|
||||||
|
upStreamStockPointId?: number;
|
||||||
|
/** 上游名称 */
|
||||||
|
upStreamName?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type UpdateTemplateDTO = {
|
type UpdateTemplateDTO = {
|
||||||
|
|
@ -1771,6 +2382,12 @@ declare namespace API {
|
||||||
sale_price?: number;
|
sale_price?: number;
|
||||||
/** 是否促销中 */
|
/** 是否促销中 */
|
||||||
on_sale?: boolean;
|
on_sale?: boolean;
|
||||||
|
/** 分类列表 */
|
||||||
|
categories?: string[];
|
||||||
|
/** 标签列表 */
|
||||||
|
tags?: string[];
|
||||||
|
/** 站点ID */
|
||||||
|
siteId?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
type usercontrollerUpdateuserParams = {
|
type usercontrollerUpdateuserParams = {
|
||||||
|
|
@ -1804,14 +2421,24 @@ declare namespace API {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
/** 变体构成成分 */
|
|
||||||
constitution?: { sku?: string; quantity?: number }[];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type webhookcontrollerHandlewoowebhookParams = {
|
type webhookcontrollerHandlewoowebhookParams = {
|
||||||
siteId?: string;
|
siteId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerBatchsynctositeParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerCreateproductParams = {
|
||||||
|
siteId: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerDeleteParams = {
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
type wpproductcontrollerGetwpproductsParams = {
|
type wpproductcontrollerGetwpproductsParams = {
|
||||||
/** 页码 */
|
/** 页码 */
|
||||||
current?: number;
|
current?: number;
|
||||||
|
|
@ -1831,20 +2458,26 @@ declare namespace API {
|
||||||
| 'auto-draft'
|
| 'auto-draft'
|
||||||
| 'future'
|
| 'future'
|
||||||
| 'inherit';
|
| 'inherit';
|
||||||
|
/** SKU列表 */
|
||||||
|
skus?: any[];
|
||||||
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerImportproductsParams = {
|
||||||
|
siteId: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
type wpproductcontrollerSearchproductsParams = {
|
type wpproductcontrollerSearchproductsParams = {
|
||||||
name?: string;
|
name?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type wpproductcontrollerSetconstitutionParams = {
|
|
||||||
id: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
type wpproductcontrollerSyncproductsParams = {
|
type wpproductcontrollerSyncproductsParams = {
|
||||||
siteId: number;
|
siteId: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type wpproductcontrollerSynctoproductParams = {
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
type wpproductcontrollerUpdateproductParams = {
|
type wpproductcontrollerUpdateproductParams = {
|
||||||
productId: string;
|
productId: string;
|
||||||
siteId: number;
|
siteId: number;
|
||||||
|
|
@ -1865,6 +2498,8 @@ declare namespace API {
|
||||||
id: number;
|
id: number;
|
||||||
/** wp网站ID */
|
/** wp网站ID */
|
||||||
siteId: number;
|
siteId: number;
|
||||||
|
/** 站点信息 */
|
||||||
|
site?: Site;
|
||||||
/** wp产品ID */
|
/** wp产品ID */
|
||||||
externalProductId: string;
|
externalProductId: string;
|
||||||
/** 商店sku */
|
/** 商店sku */
|
||||||
|
|
@ -1953,8 +2588,6 @@ declare namespace API {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
/** 产品构成成分 */
|
|
||||||
constitution?: { sku?: string; quantity?: number }[];
|
|
||||||
/** 变体列表 */
|
/** 变体列表 */
|
||||||
variations?: VariationDTO[];
|
variations?: VariationDTO[];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,30 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { request } from 'umi';
|
import { request } from 'umi';
|
||||||
|
|
||||||
/** 此处后端没有提供注释 PUT /wp_product/${param0}/constitution */
|
/** 此处后端没有提供注释 DELETE /wp_product/${param0} */
|
||||||
export async function wpproductcontrollerSetconstitution(
|
export async function wpproductcontrollerDelete(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
params: API.wpproductcontrollerSetconstitutionParams,
|
params: API.wpproductcontrollerDeleteParams,
|
||||||
body: API.SetConstitutionDTO,
|
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
const { id: param0, ...queryParams } = params;
|
const { id: param0, ...queryParams } = params;
|
||||||
return request<API.BooleanRes>(`/wp_product/${param0}/constitution`, {
|
return request<API.BooleanRes>(`/wp_product/${param0}`, {
|
||||||
method: 'PUT',
|
method: 'DELETE',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/batch-sync-to-site/${param0} */
|
||||||
|
export async function wpproductcontrollerBatchsynctosite(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.wpproductcontrollerBatchsynctositeParams,
|
||||||
|
body: API.BatchSyncProductsDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.BooleanRes>(`/wp_product/batch-sync-to-site/${param0}`, {
|
||||||
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
|
|
@ -21,10 +35,83 @@ export async function wpproductcontrollerSetconstitution(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/batch-update */
|
||||||
|
export async function wpproductcontrollerBatchupdateproducts(
|
||||||
|
body: API.BatchUpdateProductsDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.BooleanRes>('/wp_product/batch-update', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/batch-update-tags */
|
||||||
|
export async function wpproductcontrollerBatchupdatetags(
|
||||||
|
body: API.BatchUpdateTagsDTO,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.BooleanRes>('/wp_product/batch-update-tags', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/import/${param0} */
|
||||||
|
export async function wpproductcontrollerImportproducts(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.wpproductcontrollerImportproductsParams,
|
||||||
|
body: {},
|
||||||
|
files?: File[],
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
const formData = new FormData();
|
||||||
|
|
||||||
|
if (files) {
|
||||||
|
files.forEach((f) => formData.append('files', f || ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.keys(body).forEach((ele) => {
|
||||||
|
const item = (body as any)[ele];
|
||||||
|
|
||||||
|
if (item !== undefined && item !== null) {
|
||||||
|
if (typeof item === 'object' && !(item instanceof File)) {
|
||||||
|
if (item instanceof Array) {
|
||||||
|
item.forEach((f) => formData.append(ele, f || ''));
|
||||||
|
} else {
|
||||||
|
formData.append(
|
||||||
|
ele,
|
||||||
|
new Blob([JSON.stringify(item)], { type: 'application/json' }),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
formData.append(ele, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return request<API.BooleanRes>(`/wp_product/import/${param0}`, {
|
||||||
|
method: 'POST',
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: formData,
|
||||||
|
requestType: 'form',
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 GET /wp_product/list */
|
/** 此处后端没有提供注释 GET /wp_product/list */
|
||||||
export async function wpproductcontrollerGetwpproducts(
|
export async function wpproductcontrollerGetwpproducts(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
params: API.wpproductcontrollerGetwpproductsParams & { skus?: string[] },
|
params: API.wpproductcontrollerGetwpproductsParams,
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
return request<API.WpProductListRes>('/wp_product/list', {
|
return request<API.WpProductListRes>('/wp_product/list', {
|
||||||
|
|
@ -51,6 +138,40 @@ export async function wpproductcontrollerSearchproducts(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/setconstitution */
|
||||||
|
export async function wpproductcontrollerSetconstitution(
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.BooleanRes>('/wp_product/setconstitution', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/siteId/${param0}/products */
|
||||||
|
export async function wpproductcontrollerCreateproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.wpproductcontrollerCreateproductParams,
|
||||||
|
body: Record<string, any>,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { siteId: param0, ...queryParams } = params;
|
||||||
|
return request<API.BooleanRes>(`/wp_product/siteId/${param0}/products`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain',
|
||||||
|
},
|
||||||
|
params: { ...queryParams },
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param1}/products/${param0} */
|
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param1}/products/${param0} */
|
||||||
export async function wpproductcontrollerUpdateproduct(
|
export async function wpproductcontrollerUpdateproduct(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
@ -100,6 +221,20 @@ export async function wpproductcontrollerUpdatevariation(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 此处后端没有提供注释 POST /wp_product/sync-to-product/${param0} */
|
||||||
|
export async function wpproductcontrollerSynctoproduct(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: API.wpproductcontrollerSynctoproductParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
const { id: param0, ...queryParams } = params;
|
||||||
|
return request<API.BooleanRes>(`/wp_product/sync-to-product/${param0}`, {
|
||||||
|
method: 'POST',
|
||||||
|
params: { ...queryParams },
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 此处后端没有提供注释 POST /wp_product/sync/${param0} */
|
/** 此处后端没有提供注释 POST /wp_product/sync/${param0} */
|
||||||
export async function wpproductcontrollerSyncproducts(
|
export async function wpproductcontrollerSyncproducts(
|
||||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
|
@ -132,92 +267,3 @@ export async function wpproductcontrollerUpdatewpproductstate(
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function wpproductcontrollerBatchSyncToSite(
|
|
||||||
params: { siteId: number },
|
|
||||||
body: { productIds: number[] },
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
const { siteId, ...queryParams } = params;
|
|
||||||
return request<API.BooleanRes>(`/wp_product/batch-sync-to-site/${siteId}`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
params: { ...queryParams },
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function wpproductcontrollerSyncToProduct(
|
|
||||||
params: { id: number },
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
const { id, ...queryParams } = params;
|
|
||||||
return request<API.BooleanRes>(`/wp_product/sync-to-product/${id}`, {
|
|
||||||
method: 'POST',
|
|
||||||
params: { ...queryParams },
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function wpproductcontrollerBatchUpdateTags(
|
|
||||||
body: { ids: number[]; tags: string[] },
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<API.BooleanRes>('/wp_product/batch-update-tags', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function wpproductcontrollerImportProducts(
|
|
||||||
params: { siteId: number },
|
|
||||||
body: FormData,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
const { siteId, ...queryParams } = params;
|
|
||||||
return request<API.BooleanRes>(`/wp_product/import/${siteId}`, {
|
|
||||||
method: 'POST',
|
|
||||||
params: { ...queryParams },
|
|
||||||
data: body,
|
|
||||||
requestType: 'form',
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function wpproductcontrollerCreateproduct(
|
|
||||||
params: { siteId: number },
|
|
||||||
body: any,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
const { siteId, ...queryParams } = params;
|
|
||||||
return request<API.BooleanRes>(`/wp_product/siteId/${siteId}/products`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
params: { ...queryParams },
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function wpproductcontrollerBatchUpdateProducts(
|
|
||||||
body: any,
|
|
||||||
options?: { [key: string]: any },
|
|
||||||
) {
|
|
||||||
return request<API.BooleanRes>('/wp_product/batch-update', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
},
|
|
||||||
data: body,
|
|
||||||
...(options || {}),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue