ERPTurbo_Client/packages/app-client/src/services/business/channel.ts
2025-11-03 10:24:10 +08:00

110 lines
2.6 KiB
TypeScript

// @ts-ignore
/* eslint-disable */
import request from "../request";
/** 创建渠道 POST /operation/createChannel */
export async function createChannel(
body: BusinessAPI.ChannelCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseChannelVO>(
"/operation/createChannel",
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
},
);
}
/** 渠道删除 DELETE /operation/destroyChannel */
export async function destroyChannel(
body: BusinessAPI.ChannelDestroyCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>("/operation/destroyChannel", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
});
}
/** 渠道分页 GET /operation/pageChannel */
export async function pageChannel(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pageChannelParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponseChannelVO>("/operation/pageChannel", {
method: "GET",
params: {
...params,
channelPageQry: undefined,
...params["channelPageQry"],
},
...(options || {}),
});
}
/** 渠道详情 GET /operation/showChannel */
export async function showChannel(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showChannelParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseChannelVO>(
"/operation/showChannel",
{
method: "GET",
params: {
...params,
channelShowQry: undefined,
...params["channelShowQry"],
},
...(options || {}),
},
);
}
/** 渠道更新 PUT /operation/updateChannel */
export async function updateChannel(
body: BusinessAPI.ChannelUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseChannelVO>(
"/operation/updateChannel",
{
method: "PUT",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
},
);
}
/** 渠道更新 PATCH /operation/updateChannel */
export async function updateChannel1(
body: BusinessAPI.ChannelUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseChannelVO>(
"/operation/updateChannel",
{
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
},
);
}