fix: todo修复
This commit is contained in:
@@ -15,7 +15,6 @@ export namespace AiChatConversationApi {
|
||||
maxTokens: number; // 单条回复的最大 Token 数量
|
||||
maxContexts: number; // 上下文的最大 Message 数量
|
||||
createTime?: Date; // 创建时间
|
||||
// 额外字段
|
||||
systemMessage?: string; // 角色设定
|
||||
modelName?: string; // 模型名字
|
||||
roleAvatar?: string; // 角色头像
|
||||
@@ -24,52 +23,52 @@ export namespace AiChatConversationApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 获得【我的】聊天对话
|
||||
/** 获得【我的】聊天对话 */
|
||||
export function getChatConversationMy(id: number) {
|
||||
return requestClient.get<AiChatConversationApi.ChatConversation>(
|
||||
`/ai/chat/conversation/get-my?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
// 新增【我的】聊天对话
|
||||
/** 新增【我的】聊天对话 */
|
||||
export function createChatConversationMy(
|
||||
data: AiChatConversationApi.ChatConversation,
|
||||
) {
|
||||
return requestClient.post('/ai/chat/conversation/create-my', data);
|
||||
}
|
||||
|
||||
// 更新【我的】聊天对话
|
||||
/** 更新【我的】聊天对话 */
|
||||
export function updateChatConversationMy(
|
||||
data: AiChatConversationApi.ChatConversation,
|
||||
) {
|
||||
return requestClient.put(`/ai/chat/conversation/update-my`, data);
|
||||
}
|
||||
|
||||
// 删除【我的】聊天对话
|
||||
/** 删除【我的】聊天对话 */
|
||||
export function deleteChatConversationMy(id: number) {
|
||||
return requestClient.delete(`/ai/chat/conversation/delete-my?id=${id}`);
|
||||
}
|
||||
|
||||
// 删除【我的】所有对话,置顶除外
|
||||
/** 删除【我的】所有对话,置顶除外 */
|
||||
export function deleteChatConversationMyByUnpinned() {
|
||||
return requestClient.delete(`/ai/chat/conversation/delete-by-unpinned`);
|
||||
}
|
||||
|
||||
// 获得【我的】聊天对话列表
|
||||
/** 获得【我的】聊天对话列表 */
|
||||
export function getChatConversationMyList() {
|
||||
return requestClient.get<AiChatConversationApi.ChatConversation[]>(
|
||||
`/ai/chat/conversation/my-list`,
|
||||
);
|
||||
}
|
||||
|
||||
// 获得【我的】聊天对话列表
|
||||
/** 获得【我的】聊天对话列表 */
|
||||
export function getChatConversationPage(params: any) {
|
||||
return requestClient.get<
|
||||
PageResult<AiChatConversationApi.ChatConversation[]>
|
||||
>(`/ai/chat/conversation/page`, { params });
|
||||
}
|
||||
|
||||
// 管理员删除消息
|
||||
/** 管理员删除消息 */
|
||||
export function deleteChatConversationByAdmin(id: number) {
|
||||
return requestClient.delete(`/ai/chat/conversation/delete-by-admin?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ export namespace AiChatMessageApi {
|
||||
model: number; // 模型标志
|
||||
modelId: number; // 模型编号
|
||||
content: string; // 聊天内容
|
||||
reasoningContent?: string; // 推理内容(深度思考)
|
||||
tokens: number; // 消耗 Token 数量
|
||||
segmentIds?: number[]; // 段落编号
|
||||
segments?: {
|
||||
@@ -27,13 +28,25 @@ export namespace AiChatMessageApi {
|
||||
documentName: string; // 文档名称
|
||||
id: number; // 段落编号
|
||||
}[];
|
||||
webSearchPages?: WebSearchPage[]; // 联网搜索结果
|
||||
attachmentUrls?: string[]; // 附件 URL 数组
|
||||
createTime: Date; // 创建时间
|
||||
roleAvatar: string; // 角色头像
|
||||
userAvatar: string; // 用户头像
|
||||
}
|
||||
|
||||
/** 联网搜索页面接口 */
|
||||
export interface WebSearchPage {
|
||||
name: string; // 网站名称
|
||||
icon: string; // 网站图标 URL
|
||||
title: string; // 页面标题
|
||||
url: string; // 页面 URL
|
||||
snippet: string; // 简短描述
|
||||
summary: string; // 内容摘要
|
||||
}
|
||||
}
|
||||
|
||||
// 消息列表
|
||||
/** 消息列表 */
|
||||
export function getChatMessageListByConversationId(
|
||||
conversationId: null | number,
|
||||
) {
|
||||
@@ -42,15 +55,17 @@ export function getChatMessageListByConversationId(
|
||||
);
|
||||
}
|
||||
|
||||
// 发送 Stream 消息
|
||||
/** 发送 Stream 消息 */
|
||||
export function sendChatMessageStream(
|
||||
conversationId: number,
|
||||
content: string,
|
||||
ctrl: any,
|
||||
enableContext: boolean,
|
||||
enableWebSearch: boolean,
|
||||
onMessage: any,
|
||||
onError: any,
|
||||
onClose: any,
|
||||
attachmentUrls?: string[],
|
||||
) {
|
||||
const token = accessStore.accessToken;
|
||||
return fetchEventSource(`${apiURL}/ai/chat/message/send-stream`, {
|
||||
@@ -64,6 +79,8 @@ export function sendChatMessageStream(
|
||||
conversationId,
|
||||
content,
|
||||
useContext: enableContext,
|
||||
useSearch: enableWebSearch,
|
||||
attachmentUrls: attachmentUrls || [],
|
||||
}),
|
||||
onmessage: onMessage,
|
||||
onerror: onError,
|
||||
@@ -72,19 +89,19 @@ export function sendChatMessageStream(
|
||||
});
|
||||
}
|
||||
|
||||
// 删除消息
|
||||
/** 删除消息 */
|
||||
export function deleteChatMessage(id: number) {
|
||||
return requestClient.delete(`/ai/chat/message/delete?id=${id}`);
|
||||
}
|
||||
|
||||
// 删除指定对话的消息
|
||||
/** 删除指定对话的消息 */
|
||||
export function deleteByConversationId(conversationId: number) {
|
||||
return requestClient.delete(
|
||||
`/ai/chat/message/delete-by-conversation-id?conversationId=${conversationId}`,
|
||||
);
|
||||
}
|
||||
|
||||
// 获得消息分页
|
||||
/** 获得消息分页 */
|
||||
export function getChatMessagePage(params: any) {
|
||||
return requestClient.get<PageResult<AiChatMessageApi.ChatMessage>>(
|
||||
'/ai/chat/message/page',
|
||||
@@ -92,7 +109,7 @@ export function getChatMessagePage(params: any) {
|
||||
);
|
||||
}
|
||||
|
||||
// 管理员删除消息
|
||||
/** 管理员删除消息 */
|
||||
export function deleteChatMessageByAdmin(id: number) {
|
||||
return requestClient.delete(`/ai/chat/message/delete-by-admin?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace AiImageApi {
|
||||
export interface ImageMidjourneyButtons {
|
||||
customId: string; // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
|
||||
emoji: string; // 图标 emoji
|
||||
label: string; // Make Variations 文本
|
||||
style: number; // 样式: 2(Primary)、3(Green)
|
||||
}
|
||||
|
||||
/** AI 绘图 */
|
||||
/** 绘图 */
|
||||
export interface Image {
|
||||
id: number; // 编号
|
||||
userId: number;
|
||||
@@ -30,7 +23,14 @@ export namespace AiImageApi {
|
||||
finishTime: Date; // 完成时间
|
||||
}
|
||||
|
||||
export interface ImageDrawReq {
|
||||
export interface ImageMidjourneyButtons {
|
||||
customId: string; // MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
|
||||
emoji: string; // 图标 emoji
|
||||
label: string; // Make Variations 文本
|
||||
style: number; // 样式: 2(Primary)、3(Green)
|
||||
}
|
||||
|
||||
export interface ImageDrawReqVO {
|
||||
prompt: string; // 提示词
|
||||
modelId: number; // 模型
|
||||
style: string; // 图像生成的风格
|
||||
@@ -39,7 +39,7 @@ export namespace AiImageApi {
|
||||
options: object; // 绘制参数,Map<String, String>
|
||||
}
|
||||
|
||||
export interface ImageMidjourneyImagineReq {
|
||||
export interface ImageMidjourneyImagineReqVO {
|
||||
prompt: string; // 提示词
|
||||
modelId: number; // 模型
|
||||
base64Array?: string[]; // size不能为空
|
||||
@@ -54,60 +54,62 @@ export namespace AiImageApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取【我的】绘图分页
|
||||
/** 获取【我的】绘图分页 */
|
||||
export function getImagePageMy(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiImageApi.Image>>('/ai/image/my-page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取【我的】绘图记录
|
||||
/** 获取【我的】绘图记录 */
|
||||
export function getImageMy(id: number) {
|
||||
return requestClient.get<AiImageApi.Image>(`/ai/image/get-my?id=${id}`);
|
||||
}
|
||||
|
||||
// 获取【我的】绘图记录列表
|
||||
/** 获取【我的】绘图记录列表 */
|
||||
export function getImageListMyByIds(ids: number[]) {
|
||||
return requestClient.get<AiImageApi.Image[]>(`/ai/image/my-list-by-ids`, {
|
||||
params: { ids: ids.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
// 生成图片
|
||||
export function drawImage(data: AiImageApi.ImageDrawReq) {
|
||||
/** 生成图片 */
|
||||
export function drawImage(data: AiImageApi.ImageDrawReqVO) {
|
||||
return requestClient.post(`/ai/image/draw`, data);
|
||||
}
|
||||
|
||||
// 删除【我的】绘画记录
|
||||
/** 删除【我的】绘画记录 */
|
||||
export function deleteImageMy(id: number) {
|
||||
return requestClient.delete(`/ai/image/delete-my?id=${id}`);
|
||||
}
|
||||
|
||||
// ================ midjourney 专属 ================
|
||||
/** ================ midjourney 专属 ================ */
|
||||
|
||||
// 【Midjourney】生成图片
|
||||
export function midjourneyImagine(data: AiImageApi.ImageMidjourneyImagineReq) {
|
||||
/** 【Midjourney】生成图片 */
|
||||
export function midjourneyImagine(
|
||||
data: AiImageApi.ImageMidjourneyImagineReqVO,
|
||||
) {
|
||||
return requestClient.post(`/ai/image/midjourney/imagine`, data);
|
||||
}
|
||||
|
||||
// 【Midjourney】Action 操作(二次生成图片)
|
||||
/** 【Midjourney】Action 操作(二次生成图片) */
|
||||
export function midjourneyAction(data: AiImageApi.ImageMidjourneyAction) {
|
||||
return requestClient.post(`/ai/image/midjourney/action`, data);
|
||||
}
|
||||
|
||||
// ================ 绘图管理 ================
|
||||
/** ================ 绘图管理 ================ */
|
||||
|
||||
// 查询绘画分页
|
||||
/** 查询绘画分页 */
|
||||
export function getImagePage(params: any) {
|
||||
return requestClient.get<AiImageApi.Image[]>(`/ai/image/page`, { params });
|
||||
}
|
||||
|
||||
// 更新绘画发布状态
|
||||
/** 更新绘画发布状态 */
|
||||
export function updateImage(data: any) {
|
||||
return requestClient.put(`/ai/image/update`, data);
|
||||
}
|
||||
|
||||
// 删除绘画
|
||||
/** 删除绘画 */
|
||||
export function deleteImage(id: number) {
|
||||
return requestClient.delete(`/ai/image/delete?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -15,39 +15,39 @@ export namespace AiKnowledgeDocumentApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询知识库文档分页
|
||||
/** 查询知识库文档分页 */
|
||||
export function getKnowledgeDocumentPage(params: PageParam) {
|
||||
return requestClient.get<
|
||||
PageResult<AiKnowledgeDocumentApi.KnowledgeDocument>
|
||||
>('/ai/knowledge/document/page', { params });
|
||||
}
|
||||
|
||||
// 查询知识库文档详情
|
||||
/** 查询知识库文档详情 */
|
||||
export function getKnowledgeDocument(id: number) {
|
||||
return requestClient.get(`/ai/knowledge/document/get?id=${id}`);
|
||||
}
|
||||
|
||||
// 新增知识库文档(单个)
|
||||
/** 新增知识库文档(单个) */
|
||||
export function createKnowledge(data: any) {
|
||||
return requestClient.post('/ai/knowledge/document/create', data);
|
||||
}
|
||||
|
||||
// 新增知识库文档(多个)
|
||||
/** 新增知识库文档(多个) */
|
||||
export function createKnowledgeDocumentList(data: any) {
|
||||
return requestClient.post('/ai/knowledge/document/create-list', data);
|
||||
}
|
||||
|
||||
// 修改知识库文档
|
||||
/** 修改知识库文档 */
|
||||
export function updateKnowledgeDocument(data: any) {
|
||||
return requestClient.put('/ai/knowledge/document/update', data);
|
||||
}
|
||||
|
||||
// 修改知识库文档状态
|
||||
/** 修改知识库文档状态 */
|
||||
export function updateKnowledgeDocumentStatus(data: any) {
|
||||
return requestClient.put('/ai/knowledge/document/update-status', data);
|
||||
}
|
||||
|
||||
// 删除知识库文档
|
||||
/** 删除知识库文档 */
|
||||
export function deleteKnowledgeDocument(id: number) {
|
||||
return requestClient.delete(`/ai/knowledge/document/delete?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export namespace AiKnowledgeKnowledgeApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询知识库分页
|
||||
/** 查询知识库分页 */
|
||||
export function getKnowledgePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiKnowledgeKnowledgeApi.Knowledge>>(
|
||||
'/ai/knowledge/page',
|
||||
@@ -21,29 +21,29 @@ export function getKnowledgePage(params: PageParam) {
|
||||
);
|
||||
}
|
||||
|
||||
// 查询知识库详情
|
||||
/** 查询知识库详情 */
|
||||
export function getKnowledge(id: number) {
|
||||
return requestClient.get<AiKnowledgeKnowledgeApi.Knowledge>(
|
||||
`/ai/knowledge/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
// 新增知识库
|
||||
/** 新增知识库 */
|
||||
export function createKnowledge(data: AiKnowledgeKnowledgeApi.Knowledge) {
|
||||
return requestClient.post('/ai/knowledge/create', data);
|
||||
}
|
||||
|
||||
// 修改知识库
|
||||
/** 修改知识库 */
|
||||
export function updateKnowledge(data: AiKnowledgeKnowledgeApi.Knowledge) {
|
||||
return requestClient.put('/ai/knowledge/update', data);
|
||||
}
|
||||
|
||||
// 删除知识库
|
||||
/** 删除知识库 */
|
||||
export function deleteKnowledge(id: number) {
|
||||
return requestClient.delete(`/ai/knowledge/delete?id=${id}`);
|
||||
}
|
||||
|
||||
// 获取知识库简单列表
|
||||
/** 获取知识库简单列表 */
|
||||
export function getSimpleKnowledgeList() {
|
||||
return requestClient.get<AiKnowledgeKnowledgeApi.Knowledge[]>(
|
||||
'/ai/knowledge/simple-list',
|
||||
|
||||
@@ -3,7 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace AiKnowledgeSegmentApi {
|
||||
// AI 知识库分段
|
||||
export interface KnowledgeSegment {
|
||||
id: number; // 编号
|
||||
documentId: number; // 文档编号
|
||||
@@ -18,7 +17,7 @@ export namespace AiKnowledgeSegmentApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询知识库分段分页
|
||||
/** 查询知识库分段分页 */
|
||||
export function getKnowledgeSegmentPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiKnowledgeSegmentApi.KnowledgeSegment>>(
|
||||
'/ai/knowledge/segment/page',
|
||||
@@ -26,28 +25,28 @@ export function getKnowledgeSegmentPage(params: PageParam) {
|
||||
);
|
||||
}
|
||||
|
||||
// 查询知识库分段详情
|
||||
/** 查询知识库分段详情 */
|
||||
export function getKnowledgeSegment(id: number) {
|
||||
return requestClient.get<AiKnowledgeSegmentApi.KnowledgeSegment>(
|
||||
`/ai/knowledge/segment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
// 新增知识库分段
|
||||
/** 新增知识库分段 */
|
||||
export function createKnowledgeSegment(
|
||||
data: AiKnowledgeSegmentApi.KnowledgeSegment,
|
||||
) {
|
||||
return requestClient.post('/ai/knowledge/segment/create', data);
|
||||
}
|
||||
|
||||
// 修改知识库分段
|
||||
/** 修改知识库分段 */
|
||||
export function updateKnowledgeSegment(
|
||||
data: AiKnowledgeSegmentApi.KnowledgeSegment,
|
||||
) {
|
||||
return requestClient.put('/ai/knowledge/segment/update', data);
|
||||
}
|
||||
|
||||
// 修改知识库分段状态
|
||||
/** 修改知识库分段状态 */
|
||||
export function updateKnowledgeSegmentStatus(id: number, status: number) {
|
||||
return requestClient.put('/ai/knowledge/segment/update-status', {
|
||||
id,
|
||||
@@ -55,26 +54,26 @@ export function updateKnowledgeSegmentStatus(id: number, status: number) {
|
||||
});
|
||||
}
|
||||
|
||||
// 删除知识库分段
|
||||
/** 删除知识库分段 */
|
||||
export function deleteKnowledgeSegment(id: number) {
|
||||
return requestClient.delete(`/ai/knowledge/segment/delete?id=${id}`);
|
||||
}
|
||||
|
||||
// 切片内容
|
||||
/** 切片内容 */
|
||||
export function splitContent(url: string, segmentMaxTokens: number) {
|
||||
return requestClient.get('/ai/knowledge/segment/split', {
|
||||
params: { url, segmentMaxTokens },
|
||||
});
|
||||
}
|
||||
|
||||
// 获取文档处理列表
|
||||
/** 获取文档处理列表 */
|
||||
export function getKnowledgeSegmentProcessList(documentIds: number[]) {
|
||||
return requestClient.get('/ai/knowledge/segment/get-process-list', {
|
||||
params: { documentIds: documentIds.join(',') },
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索知识库分段
|
||||
/** 搜索知识库分段 */
|
||||
export function searchKnowledgeSegment(params: any) {
|
||||
return requestClient.get('/ai/knowledge/segment/search', {
|
||||
params,
|
||||
|
||||
@@ -8,7 +8,6 @@ const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
|
||||
const accessStore = useAccessStore();
|
||||
|
||||
export namespace AiMindmapApi {
|
||||
// AI 思维导图
|
||||
export interface MindMap {
|
||||
id: number; // 编号
|
||||
userId: number; // 用户编号
|
||||
@@ -19,12 +18,12 @@ export namespace AiMindmapApi {
|
||||
errorMessage: string; // 错误信息
|
||||
}
|
||||
|
||||
// AI 思维导图生成
|
||||
export interface AiMindMapGenerateReqVO {
|
||||
prompt: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 生成思维导图 Stream */
|
||||
export function generateMindMap({
|
||||
data,
|
||||
onClose,
|
||||
|
||||
@@ -26,19 +26,19 @@ export namespace AiMusicApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询音乐分页
|
||||
/** 查询音乐分页 */
|
||||
export function getMusicPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<AiMusicApi.Music>>(`/ai/music/page`, {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 更新音乐
|
||||
/** 更新音乐 */
|
||||
export function updateMusic(data: any) {
|
||||
return requestClient.put('/ai/music/update', data);
|
||||
}
|
||||
|
||||
// 删除音乐
|
||||
/** 删除音乐 */
|
||||
export function deleteMusic(id: number) {
|
||||
return requestClient.delete(`/ai/music/delete?id=${id}`);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ export namespace AiWriteApi {
|
||||
}
|
||||
}
|
||||
|
||||
/** 写作 Stream */
|
||||
export function writeStream({
|
||||
data,
|
||||
onClose,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import type { BpmModelApi } from '#/api/bpm/model';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmProcessDefinitionApi {
|
||||
@@ -9,16 +11,21 @@ export namespace BpmProcessDefinitionApi {
|
||||
key?: string;
|
||||
version: number;
|
||||
name: string;
|
||||
category: string;
|
||||
description: string;
|
||||
deploymentTime: number;
|
||||
suspensionState: number;
|
||||
modelType: number;
|
||||
modelId: string;
|
||||
formType?: number;
|
||||
formId?: number;
|
||||
formName?: string;
|
||||
formCustomCreatePath?: string;
|
||||
bpmnXml?: string;
|
||||
simpleModel?: string;
|
||||
formFields?: string[];
|
||||
icon?: string;
|
||||
startUsers?: BpmModelApi.UserInfo[];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,6 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmModelApi {
|
||||
/** 用户信息 TODO 这个是不是可以抽取出来定义在公共模块 */
|
||||
// TODO @芋艿:一起看看。
|
||||
export interface UserInfo {
|
||||
id: number;
|
||||
nickname: string;
|
||||
avatar?: string;
|
||||
deptId?: number;
|
||||
deptName?: string;
|
||||
}
|
||||
|
||||
/** 流程定义 */
|
||||
export interface ProcessDefinition {
|
||||
id: string;
|
||||
key?: string;
|
||||
version: number;
|
||||
deploymentTime: number;
|
||||
suspensionState: number;
|
||||
formType?: number;
|
||||
formCustomViewPath?: string;
|
||||
}
|
||||
|
||||
/** 流程模型 */
|
||||
export interface Model {
|
||||
id: number;
|
||||
@@ -42,6 +21,27 @@ export namespace BpmModelApi {
|
||||
bpmnXml: string;
|
||||
startUsers?: UserInfo[];
|
||||
}
|
||||
|
||||
/** 流程定义 */
|
||||
export interface ProcessDefinition {
|
||||
id: string;
|
||||
key?: string;
|
||||
version: number;
|
||||
deploymentTime: number;
|
||||
suspensionState: number;
|
||||
formType?: number;
|
||||
formCustomViewPath?: string;
|
||||
formFields?: string[];
|
||||
}
|
||||
|
||||
/** 用户信息 */
|
||||
export interface UserInfo {
|
||||
id: number;
|
||||
nickname: string;
|
||||
avatar?: string;
|
||||
deptId?: number;
|
||||
deptName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 模型分类信息 */
|
||||
|
||||
@@ -11,43 +11,6 @@ import type { BpmModelApi } from '#/api/bpm/model';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmProcessInstanceApi {
|
||||
// TODO @芋艿:一些注释缺少或者不对;
|
||||
export interface Task {
|
||||
id: number;
|
||||
name: string;
|
||||
assigneeUser?: User;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
avatar: string;
|
||||
id: number;
|
||||
nickname: string;
|
||||
}
|
||||
|
||||
// 审批任务信息
|
||||
export interface ApprovalTaskInfo {
|
||||
assigneeUser: User;
|
||||
id: number;
|
||||
ownerUser: User;
|
||||
reason: string;
|
||||
signPicUrl: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
// 审批节点信息
|
||||
export interface ApprovalNodeInfo {
|
||||
candidateStrategy?: BpmCandidateStrategyEnum;
|
||||
candidateUsers?: User[];
|
||||
endTime?: Date;
|
||||
id: string;
|
||||
name: string;
|
||||
nodeType: BpmNodeTypeEnum;
|
||||
startTime?: Date;
|
||||
status: number;
|
||||
processInstanceId?: string;
|
||||
tasks: ApprovalTaskInfo[];
|
||||
}
|
||||
|
||||
/** 流程实例 */
|
||||
export interface ProcessInstance {
|
||||
businessKey: string;
|
||||
@@ -73,8 +36,23 @@ export namespace BpmProcessInstanceApi {
|
||||
tasks?: BpmProcessInstanceApi.Task[];
|
||||
}
|
||||
|
||||
// 审批详情
|
||||
export interface ApprovalDetail {
|
||||
/** 流程实例的任务 */
|
||||
export interface Task {
|
||||
id: number;
|
||||
name: string;
|
||||
assigneeUser?: User;
|
||||
}
|
||||
|
||||
/** 流程实例的用户信息 */
|
||||
export interface User {
|
||||
id: number;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
deptName?: string;
|
||||
}
|
||||
|
||||
/** 审批详情 */
|
||||
export interface ApprovalDetailRespVO {
|
||||
activityNodes: BpmProcessInstanceApi.ApprovalNodeInfo[];
|
||||
formFieldsPermission: any;
|
||||
processDefinition: BpmModelApi.ProcessDefinition;
|
||||
@@ -83,8 +61,32 @@ export namespace BpmProcessInstanceApi {
|
||||
todoTask: BpmTaskApi.Task;
|
||||
}
|
||||
|
||||
// 抄送流程实例
|
||||
export interface Copy {
|
||||
/** 审批详情的节点信息 */
|
||||
export interface ApprovalNodeInfo {
|
||||
candidateStrategy?: BpmCandidateStrategyEnum;
|
||||
candidateUsers?: User[];
|
||||
endTime?: Date;
|
||||
id: string;
|
||||
name: string;
|
||||
nodeType: BpmNodeTypeEnum;
|
||||
startTime?: Date;
|
||||
status: number;
|
||||
processInstanceId?: string;
|
||||
tasks: ApprovalTaskInfo[];
|
||||
}
|
||||
|
||||
/** 审批详情的节点的任务 */
|
||||
export interface ApprovalTaskInfo {
|
||||
id: number;
|
||||
assigneeUser: User;
|
||||
ownerUser: User;
|
||||
reason: string;
|
||||
signPicUrl: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
/** 抄送流程实例 */
|
||||
export interface ProcessInstanceCopyRespVO {
|
||||
activityId: string;
|
||||
activityName: string;
|
||||
createTime: number;
|
||||
@@ -101,6 +103,19 @@ export namespace BpmProcessInstanceApi {
|
||||
}[];
|
||||
taskId: string;
|
||||
}
|
||||
|
||||
/** 流程实例的打印数据响应 */
|
||||
export interface ProcessPrintDataRespVO {
|
||||
printTemplateEnable: boolean;
|
||||
printTemplateHtml?: string;
|
||||
processInstance: ProcessInstance;
|
||||
tasks: {
|
||||
description: string;
|
||||
id: number;
|
||||
name: string;
|
||||
signPicUrl?: string;
|
||||
}[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询我的流程实例分页 */
|
||||
@@ -177,7 +192,7 @@ export async function updateProcessInstance(
|
||||
|
||||
/** 获取审批详情 */
|
||||
export async function getApprovalDetail(params: any) {
|
||||
return requestClient.get<BpmProcessInstanceApi.ApprovalDetail>(
|
||||
return requestClient.get<BpmProcessInstanceApi.ApprovalDetailRespVO>(
|
||||
`/bpm/process-instance/get-approval-detail`,
|
||||
{ params },
|
||||
);
|
||||
@@ -191,17 +206,16 @@ export async function getNextApprovalNodes(params: any) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取表单字段权限 */
|
||||
export async function getFormFieldsPermission(params: any) {
|
||||
return requestClient.get<BpmProcessInstanceApi.ProcessInstance>(
|
||||
`/bpm/process-instance/get-form-fields-permission`,
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取流程实例 BPMN 模型视图 */
|
||||
export async function getProcessInstanceBpmnModelView(id: string) {
|
||||
return requestClient.get<BpmProcessInstanceApi.ProcessInstance>(
|
||||
`/bpm/process-instance/get-bpmn-model-view?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取流程实例打印数据 */
|
||||
export async function getProcessInstancePrintData(id: string) {
|
||||
return requestClient.get<BpmProcessInstanceApi.ProcessPrintDataRespVO>(
|
||||
`/bpm/process-instance/get-print-data?processInstanceId=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmProcessListenerApi {
|
||||
/** BPM 流程监听器 */
|
||||
/** 流程监听器 */
|
||||
export interface ProcessListener {
|
||||
id: number; // 编号
|
||||
name: string; // 监听器名字
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { BpmProcessInstanceApi } from '../processInstance';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmTaskApi {
|
||||
/** BPM 流程监听器 */
|
||||
/** 流程任务 */
|
||||
export interface Task {
|
||||
id: number; // 编号
|
||||
name: string; // 监听器名字
|
||||
@@ -15,33 +15,6 @@ export namespace BpmTaskApi {
|
||||
valueType: string; // 监听器值类型
|
||||
processInstance?: BpmProcessInstanceApi.ProcessInstance; // 流程实例
|
||||
}
|
||||
|
||||
// 流程任务
|
||||
export interface TaskManager {
|
||||
id: string; // 编号
|
||||
name: string; // 任务名称
|
||||
createTime: number; // 创建时间
|
||||
endTime: number; // 结束时间
|
||||
durationInMillis: number; // 持续时间
|
||||
status: number; // 状态
|
||||
reason: string; // 原因
|
||||
ownerUser: any; // 负责人
|
||||
assigneeUser: any; // 处理人
|
||||
taskDefinitionKey: string; // 任务定义key
|
||||
processInstanceId: string; // 流程实例id
|
||||
processInstance: BpmProcessInstanceApi.ProcessInstance; // 流程实例
|
||||
parentTaskId: any; // 父任务id
|
||||
children: any; // 子任务
|
||||
formId: any; // 表单id
|
||||
formName: any; // 表单名称
|
||||
formConf: any; // 表单配置
|
||||
formFields: any; // 表单字段
|
||||
formVariables: any; // 表单变量
|
||||
buttonsSetting: any; // 按钮设置
|
||||
signEnable: any; // 签名设置
|
||||
reasonRequire: any; // 原因设置
|
||||
nodeType: any; // 节点类型
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询待办任务分页 */
|
||||
@@ -88,51 +61,44 @@ export const getTaskListByReturn = async (id: string) => {
|
||||
return await requestClient.get(`/bpm/task/list-by-return?id=${id}`);
|
||||
};
|
||||
|
||||
/** 退回 */
|
||||
/** 退回任务 */
|
||||
export const returnTask = async (data: any) => {
|
||||
return await requestClient.put('/bpm/task/return', data);
|
||||
};
|
||||
|
||||
// 委派
|
||||
/** 委派任务 */
|
||||
export const delegateTask = async (data: any) => {
|
||||
return await requestClient.put('/bpm/task/delegate', data);
|
||||
};
|
||||
|
||||
// 转派
|
||||
/** 转派任务 */
|
||||
export const transferTask = async (data: any) => {
|
||||
return await requestClient.put('/bpm/task/transfer', data);
|
||||
};
|
||||
|
||||
// 加签
|
||||
/** 加签任务 */
|
||||
export const signCreateTask = async (data: any) => {
|
||||
return await requestClient.put('/bpm/task/create-sign', data);
|
||||
};
|
||||
|
||||
// 减签
|
||||
/** 减签任务 */
|
||||
export const signDeleteTask = async (data: any) => {
|
||||
return await requestClient.delete('/bpm/task/delete-sign', data);
|
||||
};
|
||||
|
||||
// 抄送
|
||||
/** 抄送任务 */
|
||||
export const copyTask = async (data: any) => {
|
||||
return await requestClient.put('/bpm/task/copy', data);
|
||||
};
|
||||
|
||||
// 获取我的待办任务
|
||||
export const myTodoTask = async (processInstanceId: string) => {
|
||||
return await requestClient.get(
|
||||
`/bpm/task/my-todo?processInstanceId=${processInstanceId}`,
|
||||
);
|
||||
};
|
||||
|
||||
// 获取加签任务列表
|
||||
/** 获取加签任务列表 */
|
||||
export const getChildrenTaskList = async (id: string) => {
|
||||
return await requestClient.get(
|
||||
`/bpm/task/list-by-parent-task-id?parentTaskId=${id}`,
|
||||
);
|
||||
};
|
||||
|
||||
// 撤回任务
|
||||
/** 撤回任务 */
|
||||
export const withdrawTask = async (taskId: string) => {
|
||||
return await requestClient.put('/bpm/task/withdraw', null, {
|
||||
params: { taskId },
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace BpmUserGroupApi {
|
||||
/** BPM 用户组 */
|
||||
/** 用户组 */
|
||||
export interface UserGroup {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBrandApi {
|
||||
/** 商品品牌 */
|
||||
export interface Brand {
|
||||
/** 品牌编号 */
|
||||
id?: number;
|
||||
/** 品牌名称 */
|
||||
name: string;
|
||||
/** 品牌图片 */
|
||||
picUrl: string;
|
||||
/** 品牌排序 */
|
||||
sort?: number;
|
||||
/** 品牌描述 */
|
||||
description?: string;
|
||||
/** 开启状态 */
|
||||
status: number;
|
||||
id?: number; // 品牌编号
|
||||
name: string; // 品牌名称
|
||||
picUrl: string; // 品牌图片
|
||||
sort?: number; // 品牌排序
|
||||
description?: string; // 品牌描述
|
||||
status: number; // 开启状态
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,18 +3,12 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallCategoryApi {
|
||||
/** 产品分类 */
|
||||
export interface Category {
|
||||
/** 分类编号 */
|
||||
id?: number;
|
||||
/** 父分类编号 */
|
||||
parentId?: number;
|
||||
/** 分类名称 */
|
||||
name: string;
|
||||
/** 移动端分类图 */
|
||||
picUrl: string;
|
||||
/** 分类排序 */
|
||||
sort: number;
|
||||
/** 开启状态 */
|
||||
status: number;
|
||||
id?: number; // 分类编号
|
||||
parentId?: number; // 父分类编号
|
||||
name: string; // 分类名称
|
||||
picUrl: string; // 移动端分类图
|
||||
sort: number; // 分类排序
|
||||
status: number; // 开启状态
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,10 +43,3 @@ export function getCategoryList(params: any) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 获得商品分类列表 */
|
||||
export function getCategorySimpleList() {
|
||||
return requestClient.get<MallCategoryApi.Category[]>(
|
||||
'/product/category/list',
|
||||
);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallCommentApi {
|
||||
export interface Property {
|
||||
propertyId: number;
|
||||
propertyName: string;
|
||||
valueId: number;
|
||||
valueName: string;
|
||||
}
|
||||
/** 商品评论 */
|
||||
export interface Comment {
|
||||
id: number;
|
||||
userId: number;
|
||||
userNickname: string;
|
||||
userAvatar: string;
|
||||
anonymous: boolean;
|
||||
orderId: number;
|
||||
orderItemId: number;
|
||||
spuId: number;
|
||||
spuName: string;
|
||||
skuId: number;
|
||||
visible: boolean;
|
||||
scores: number;
|
||||
descriptionScores: number;
|
||||
benefitScores: number;
|
||||
content: string;
|
||||
picUrls: string[];
|
||||
replyStatus: boolean;
|
||||
replyUserId: number;
|
||||
replyContent: string;
|
||||
replyTime: Date;
|
||||
createTime: Date;
|
||||
skuProperties: Property[];
|
||||
}
|
||||
|
||||
/** 评论可见性更新 */
|
||||
export interface CommentVisibleUpdate {
|
||||
id: number;
|
||||
visible: boolean;
|
||||
}
|
||||
|
||||
/** 评论回复 */
|
||||
export interface CommentReply {
|
||||
id: number;
|
||||
replyContent: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询商品评论列表 */
|
||||
export function getCommentPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallCommentApi.Comment>>(
|
||||
'/product/comment/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询商品评论详情 */
|
||||
export function getComment(id: number) {
|
||||
return requestClient.get<MallCommentApi.Comment>(
|
||||
`/product/comment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 添加自评 */
|
||||
export function createComment(data: MallCommentApi.Comment) {
|
||||
return requestClient.post('/product/comment/create', data);
|
||||
}
|
||||
|
||||
/** 显示 / 隐藏评论 */
|
||||
export function updateCommentVisible(
|
||||
data: MallCommentApi.CommentVisibleUpdate,
|
||||
) {
|
||||
return requestClient.put('/product/comment/update-visible', data);
|
||||
}
|
||||
|
||||
/** 商家回复 */
|
||||
export function replyComment(data: MallCommentApi.CommentReply) {
|
||||
return requestClient.put('/product/comment/reply', data);
|
||||
}
|
||||
80
apps/web-ele/src/api/mall/product/comment/index.ts
Normal file
80
apps/web-ele/src/api/mall/product/comment/index.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallCommentApi {
|
||||
/** 商品评论 */
|
||||
export interface Comment {
|
||||
id: number; // 评论编号
|
||||
userId: number; // 用户编号
|
||||
userNickname: string; // 用户昵称
|
||||
userAvatar: string; // 用户头像
|
||||
anonymous: boolean; // 是否匿名
|
||||
orderId: number; // 订单编号
|
||||
orderItemId: number; // 订单项编号
|
||||
spuId: number; // 商品SPU编号
|
||||
spuName: string; // 商品名称
|
||||
skuId: number; // 商品SKU编号
|
||||
visible: boolean; // 是否可见
|
||||
scores: number; // 总评分
|
||||
descriptionScores: number; // 描述评分
|
||||
benefitScores: number; // 服务评分
|
||||
content: string; // 评论内容
|
||||
picUrls: string[]; // 评论图片
|
||||
replyStatus: boolean; // 是否回复
|
||||
replyUserId: number; // 回复人编号
|
||||
replyContent: string; // 回复内容
|
||||
replyTime: Date; // 回复时间
|
||||
createTime: Date; // 创建时间
|
||||
skuProperties: {
|
||||
propertyId: number; // 属性 ID
|
||||
propertyName: string; // 属性名称
|
||||
valueId: number; // 属性值 ID
|
||||
valueName: string; // 属性值名称
|
||||
}[]; // SKU 属性数组
|
||||
}
|
||||
|
||||
/** 评论可见性更新请求 */
|
||||
export interface CommentVisibleUpdateReqVO {
|
||||
id: number; // 评论编号
|
||||
visible: boolean; // 是否可见
|
||||
}
|
||||
|
||||
/** 评论回复请求 */
|
||||
export interface CommentReplyReqVO {
|
||||
id: number; // 评论编号
|
||||
replyContent: string; // 回复内容
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询商品评论列表 */
|
||||
export function getCommentPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallCommentApi.Comment>>(
|
||||
'/product/comment/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询商品评论详情 */
|
||||
export function getComment(id: number) {
|
||||
return requestClient.get<MallCommentApi.Comment>(
|
||||
`/product/comment/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 添加自评 */
|
||||
export function createComment(data: MallCommentApi.Comment) {
|
||||
return requestClient.post('/product/comment/create', data);
|
||||
}
|
||||
|
||||
/** 显示 / 隐藏评论 */
|
||||
export function updateCommentVisible(
|
||||
data: MallCommentApi.CommentVisibleUpdateReqVO,
|
||||
) {
|
||||
return requestClient.put('/product/comment/update-visible', data);
|
||||
}
|
||||
|
||||
/** 商家回复 */
|
||||
export function replyComment(data: MallCommentApi.CommentReplyReqVO) {
|
||||
return requestClient.put('/product/comment/reply', data);
|
||||
}
|
||||
@@ -5,12 +5,9 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallFavoriteApi {
|
||||
/** 商品收藏 */
|
||||
export interface Favorite {
|
||||
/** 收藏编号 */
|
||||
id?: number;
|
||||
/** 用户编号 */
|
||||
userId?: string;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: null | number;
|
||||
id?: number; // 收藏编号
|
||||
userId?: string; // 用户编号
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,22 +5,14 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallHistoryApi {
|
||||
/** 商品浏览记录 */
|
||||
export interface BrowseHistory {
|
||||
/** 记录编号 */
|
||||
id?: number;
|
||||
/** 用户编号 */
|
||||
userId?: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 浏览时间 */
|
||||
createTime?: Date;
|
||||
id?: number; // 记录编号
|
||||
userId?: number; // 用户编号
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
createTime?: Date; // 浏览时间
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品浏览记录分页
|
||||
*
|
||||
* @param params 请求参数
|
||||
*/
|
||||
/** 获得商品浏览记录分页 */
|
||||
export function getBrowseHistoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
|
||||
'/product/browse-history/page',
|
||||
@@ -5,29 +5,17 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallPropertyApi {
|
||||
/** 商品属性 */
|
||||
export interface Property {
|
||||
/** 属性编号 */
|
||||
id?: number;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
id?: number; // 属性编号
|
||||
name: string; // 名称
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 属性值 */
|
||||
export interface PropertyValue {
|
||||
/** 属性值编号 */
|
||||
id?: number;
|
||||
/** 属性项的编号 */
|
||||
propertyId?: number;
|
||||
/** 名称 */
|
||||
name: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
/** 属性值查询参数 */
|
||||
export interface PropertyValueQuery extends PageParam {
|
||||
propertyId?: number;
|
||||
id?: number; // 属性值编号
|
||||
propertyId?: number; // 属性项的编号
|
||||
name: string; // 名称
|
||||
remark?: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +57,7 @@ export function getPropertySimpleList() {
|
||||
}
|
||||
|
||||
/** 获得属性值分页 */
|
||||
export function getPropertyValuePage(
|
||||
params: MallPropertyApi.PropertyValueQuery,
|
||||
) {
|
||||
export function getPropertyValuePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallPropertyApi.PropertyValue>>(
|
||||
'/product/property/value/page',
|
||||
{ params },
|
||||
@@ -1,179 +0,0 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallSpuApi {
|
||||
/** 商品属性 */
|
||||
export interface Property {
|
||||
/** 属性编号 */
|
||||
propertyId?: number;
|
||||
/** 属性名称 */
|
||||
propertyName?: string;
|
||||
/** 属性值编号 */
|
||||
valueId?: number;
|
||||
/** 属性值名称 */
|
||||
valueName?: string;
|
||||
}
|
||||
|
||||
/** 商品 SKU */
|
||||
export interface Sku {
|
||||
/** 商品 SKU 编号 */
|
||||
id?: number;
|
||||
/** 商品 SKU 名称 */
|
||||
name?: string;
|
||||
/** SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 属性数组 */
|
||||
properties?: Property[];
|
||||
/** 商品价格 */
|
||||
price?: number | string;
|
||||
/** 市场价 */
|
||||
marketPrice?: number | string;
|
||||
/** 成本价 */
|
||||
costPrice?: number | string;
|
||||
/** 商品条码 */
|
||||
barCode?: string;
|
||||
/** 图片地址 */
|
||||
picUrl?: string;
|
||||
/** 库存 */
|
||||
stock?: number;
|
||||
/** 商品重量,单位:kg 千克 */
|
||||
weight?: number;
|
||||
/** 商品体积,单位:m^3 平米 */
|
||||
volume?: number;
|
||||
/** 一级分销的佣金 */
|
||||
firstBrokeragePrice?: number | string;
|
||||
/** 二级分销的佣金 */
|
||||
secondBrokeragePrice?: number | string;
|
||||
/** 商品销量 */
|
||||
salesCount?: number;
|
||||
}
|
||||
|
||||
/** 优惠券模板 */
|
||||
export interface GiveCouponTemplate {
|
||||
/** 优惠券编号 */
|
||||
id?: number;
|
||||
/** 优惠券名称 */
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/** 商品 SPU */
|
||||
export interface Spu {
|
||||
/** 商品编号 */
|
||||
id?: number;
|
||||
/** 商品名称 */
|
||||
name?: string;
|
||||
/** 商品分类 */
|
||||
categoryId?: number;
|
||||
/** 关键字 */
|
||||
keyword?: string;
|
||||
/** 单位 */
|
||||
unit?: number | undefined;
|
||||
/** 商品封面图 */
|
||||
picUrl?: string;
|
||||
/** 商品轮播图 */
|
||||
sliderPicUrls?: string[];
|
||||
/** 商品简介 */
|
||||
introduction?: string;
|
||||
/** 配送方式 */
|
||||
deliveryTypes?: number[];
|
||||
/** 运费模版 */
|
||||
deliveryTemplateId?: number | undefined;
|
||||
/** 商品品牌编号 */
|
||||
brandId?: number;
|
||||
/** 商品规格 */
|
||||
specType?: boolean;
|
||||
/** 分销类型 */
|
||||
subCommissionType?: boolean;
|
||||
/** sku数组 */
|
||||
skus?: Sku[];
|
||||
/** 商品详情 */
|
||||
description?: string;
|
||||
/** 商品排序 */
|
||||
sort?: number;
|
||||
/** 赠送积分 */
|
||||
giveIntegral?: number;
|
||||
/** 虚拟销量 */
|
||||
virtualSalesCount?: number;
|
||||
/** 商品价格 */
|
||||
price?: number;
|
||||
/** 商品拼团价格 */
|
||||
combinationPrice?: number;
|
||||
/** 商品秒杀价格 */
|
||||
seckillPrice?: number;
|
||||
/** 商品销量 */
|
||||
salesCount?: number;
|
||||
/** 市场价 */
|
||||
marketPrice?: number;
|
||||
/** 成本价 */
|
||||
costPrice?: number;
|
||||
/** 商品库存 */
|
||||
stock?: number;
|
||||
/** 商品创建时间 */
|
||||
createTime?: Date;
|
||||
/** 商品状态 */
|
||||
status?: number;
|
||||
/** 浏览量 */
|
||||
browseCount?: number;
|
||||
}
|
||||
|
||||
/** 商品状态更新 */
|
||||
export interface StatusUpdate {
|
||||
/** 商品编号 */
|
||||
id: number;
|
||||
/** 商品状态 */
|
||||
status: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 列表 */
|
||||
export function getSpuPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallSpuApi.Spu>>('/product/spu/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 列表 tabsCount */
|
||||
export function getTabsCount() {
|
||||
return requestClient.get<Record<string, number>>('/product/spu/get-count');
|
||||
}
|
||||
|
||||
/** 创建商品 SPU */
|
||||
export function createSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.post('/product/spu/create', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU */
|
||||
export function updateSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.put('/product/spu/update', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU 状态 */
|
||||
export function updateStatus(data: MallSpuApi.StatusUpdate) {
|
||||
return requestClient.put('/product/spu/update-status', data);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU */
|
||||
export function getSpu(id: number) {
|
||||
return requestClient.get<MallSpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 详情列表 */
|
||||
export function getSpuDetailList(ids: number[]) {
|
||||
return requestClient.get<MallSpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
|
||||
}
|
||||
|
||||
/** 删除商品 SPU */
|
||||
export function deleteSpu(id: number) {
|
||||
return requestClient.delete(`/product/spu/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出商品 SPU Excel */
|
||||
export function exportSpu(params: PageParam) {
|
||||
return requestClient.download('/product/spu/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 精简列表 */
|
||||
export function getSpuSimpleList() {
|
||||
return requestClient.get<MallSpuApi.Spu[]>('/product/spu/list-all-simple');
|
||||
}
|
||||
129
apps/web-ele/src/api/mall/product/spu/index.ts
Normal file
129
apps/web-ele/src/api/mall/product/spu/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallSpuApi {
|
||||
/** 商品 SPU */
|
||||
export interface Spu {
|
||||
id?: number; // 商品编号
|
||||
name?: string; // 商品名称
|
||||
categoryId?: number; // 商品分类
|
||||
keyword?: string; // 关键字
|
||||
unit?: number; // 单位
|
||||
picUrl?: string; // 商品封面图
|
||||
sliderPicUrls?: string[]; // 商品轮播图
|
||||
introduction?: string; // 商品简介
|
||||
deliveryTypes?: number[]; // 配送方式
|
||||
deliveryTemplateId?: number; // 运费模版
|
||||
brandId?: number; // 商品品牌编号
|
||||
specType?: boolean; // 商品规格
|
||||
subCommissionType?: boolean; // 分销类型
|
||||
skus?: Sku[]; // sku数组
|
||||
description?: string; // 商品详情
|
||||
sort?: number; // 商品排序
|
||||
giveIntegral?: number; // 赠送积分
|
||||
virtualSalesCount?: number; // 虚拟销量
|
||||
price?: number; // 商品价格
|
||||
combinationPrice?: number; // 商品拼团价格
|
||||
seckillPrice?: number; // 商品秒杀价格
|
||||
salesCount?: number; // 商品销量
|
||||
marketPrice?: number; // 市场价
|
||||
costPrice?: number; // 成本价
|
||||
stock?: number; // 商品库存
|
||||
createTime?: Date; // 商品创建时间
|
||||
status?: number; // 商品状态
|
||||
browseCount?: number; // 浏览量
|
||||
}
|
||||
|
||||
/** 商品 SKU */
|
||||
export interface Sku {
|
||||
id?: number; // 商品 SKU 编号
|
||||
name?: string; // 商品 SKU 名称
|
||||
spuId?: number; // SPU 编号
|
||||
properties?: Property[]; // 属性数组
|
||||
price?: number | string; // 商品价格
|
||||
marketPrice?: number | string; // 市场价
|
||||
costPrice?: number | string; // 成本价
|
||||
barCode?: string; // 商品条码
|
||||
picUrl?: string; // 图片地址
|
||||
stock?: number; // 库存
|
||||
weight?: number; // 商品重量,单位:kg 千克
|
||||
volume?: number; // 商品体积,单位:m^3 平米
|
||||
firstBrokeragePrice?: number | string; // 一级分销的佣金
|
||||
secondBrokeragePrice?: number | string; // 二级分销的佣金
|
||||
salesCount?: number; // 商品销量
|
||||
}
|
||||
|
||||
/** 商品属性 */
|
||||
export interface Property {
|
||||
propertyId?: number; // 属性编号
|
||||
propertyName?: string; // 属性名称
|
||||
valueId?: number; // 属性值编号
|
||||
valueName?: string; // 属性值名称
|
||||
}
|
||||
|
||||
// TODO @puhui999:这个还要么?
|
||||
/** 优惠券模板 */
|
||||
export interface GiveCouponTemplate {
|
||||
id?: number; // 优惠券编号
|
||||
name?: string; // 优惠券名称
|
||||
}
|
||||
|
||||
/** 商品状态更新请求 */
|
||||
export interface SpuStatusUpdateReqVO {
|
||||
id: number; // 商品编号
|
||||
status: number; // 商品状态
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 列表 */
|
||||
export function getSpuPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallSpuApi.Spu>>('/product/spu/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 列表 tabsCount */
|
||||
export function getTabsCount() {
|
||||
return requestClient.get<Record<string, number>>('/product/spu/get-count');
|
||||
}
|
||||
|
||||
/** 创建商品 SPU */
|
||||
export function createSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.post('/product/spu/create', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU */
|
||||
export function updateSpu(data: MallSpuApi.Spu) {
|
||||
return requestClient.put('/product/spu/update', data);
|
||||
}
|
||||
|
||||
/** 更新商品 SPU 状态 */
|
||||
export function updateStatus(data: MallSpuApi.SpuStatusUpdateReqVO) {
|
||||
return requestClient.put('/product/spu/update-status', data);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU */
|
||||
export function getSpu(id: number) {
|
||||
return requestClient.get<MallSpuApi.Spu>(`/product/spu/get-detail?id=${id}`);
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 详情列表 */
|
||||
export function getSpuDetailList(ids: number[]) {
|
||||
return requestClient.get<MallSpuApi.Spu[]>(`/product/spu/list?spuIds=${ids}`);
|
||||
}
|
||||
|
||||
/** 删除商品 SPU */
|
||||
export function deleteSpu(id: number) {
|
||||
return requestClient.delete(`/product/spu/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出商品 SPU Excel */
|
||||
export function exportSpu(params: PageParam) {
|
||||
return requestClient.download('/product/spu/export-excel', { params });
|
||||
}
|
||||
|
||||
/** 获得商品 SPU 精简列表 */
|
||||
export function getSpuSimpleList() {
|
||||
return requestClient.get<MallSpuApi.Spu[]>('/product/spu/list-all-simple');
|
||||
}
|
||||
@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallArticleCategoryApi {
|
||||
/** 文章分类 */
|
||||
export interface ArticleCategory {
|
||||
/** 分类编号 */
|
||||
id: number;
|
||||
/** 分类名称 */
|
||||
name: string;
|
||||
/** 分类图片 */
|
||||
picUrl: string;
|
||||
/** 状态 */
|
||||
status: number;
|
||||
/** 排序 */
|
||||
sort: number;
|
||||
id: number; // 分类编号
|
||||
name: string; // 分类名称
|
||||
picUrl: string; // 分类图片
|
||||
status: number; // 状态
|
||||
sort: number; // 排序
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,18 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBannerApi {
|
||||
/** Banner 信息 */
|
||||
export interface Banner {
|
||||
id: number;
|
||||
title: string;
|
||||
picUrl: string;
|
||||
status: number;
|
||||
url: string;
|
||||
position: number;
|
||||
sort: number;
|
||||
memo: string;
|
||||
id: number; // Banner 编号
|
||||
title: string; // Banner 标题
|
||||
picUrl: string; // Banner 图片
|
||||
status: number; // 状态
|
||||
url: string; // 链接地址
|
||||
position: number; // Banner 位置
|
||||
sort: number; // 排序
|
||||
memo: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询Banner管理列表 */
|
||||
/** 查询 Banner 管理列表 */
|
||||
export function getBannerPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallBannerApi.Banner>>(
|
||||
'/promotion/banner/page',
|
||||
@@ -24,24 +24,24 @@ export function getBannerPage(params: PageParam) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询Banner管理详情 */
|
||||
/** 查询 Banner 管理详情 */
|
||||
export function getBanner(id: number) {
|
||||
return requestClient.get<MallBannerApi.Banner>(
|
||||
`/promotion/banner/get?id=${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/** 新增Banner管理 */
|
||||
/** 新增 Banner 管理 */
|
||||
export function createBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.post('/promotion/banner/create', data);
|
||||
}
|
||||
|
||||
/** 修改Banner管理 */
|
||||
/** 修改 Banner 管理 */
|
||||
export function updateBanner(data: MallBannerApi.Banner) {
|
||||
return requestClient.put('/promotion/banner/update', data);
|
||||
}
|
||||
|
||||
/** 删除Banner管理 */
|
||||
/** 删除 Banner 管理 */
|
||||
export function deleteBanner(id: number) {
|
||||
return requestClient.delete(`/promotion/banner/delete?id=${id}`);
|
||||
}
|
||||
@@ -7,62 +7,41 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBargainActivityApi {
|
||||
/** 砍价活动 */
|
||||
export interface BargainActivity {
|
||||
/** 活动编号 */
|
||||
id?: number;
|
||||
/** 活动名称 */
|
||||
name?: string;
|
||||
/** 开始时间 */
|
||||
startTime?: Date;
|
||||
/** 结束时间 */
|
||||
endTime?: Date;
|
||||
/** 状态 */
|
||||
status?: number;
|
||||
/** 达到该人数,才能砍到低价 */
|
||||
helpMaxCount?: number;
|
||||
/** 最大帮砍次数 */
|
||||
bargainCount?: number;
|
||||
/** 最大购买次数 */
|
||||
totalLimitCount?: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 砍价起始价格,单位分 */
|
||||
bargainFirstPrice: number;
|
||||
/** 砍价底价 */
|
||||
bargainMinPrice: number;
|
||||
/** 活动库存 */
|
||||
stock: number;
|
||||
/** 用户每次砍价的最小金额,单位:分 */
|
||||
randomMinPrice?: number;
|
||||
/** 用户每次砍价的最大金额,单位:分 */
|
||||
randomMaxPrice?: number;
|
||||
id?: number; // 活动编号
|
||||
name?: string; // 活动名称
|
||||
startTime?: Date; // 开始时间
|
||||
endTime?: Date; // 结束时间
|
||||
status?: number; // 状态
|
||||
helpMaxCount?: number; // 达到该人数,才能砍到低价
|
||||
bargainCount?: number; // 最大帮砍次数
|
||||
totalLimitCount?: number; // 最大购买次数
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
bargainFirstPrice: number; // 砍价起始价格,单位分
|
||||
bargainMinPrice: number; // 砍价底价
|
||||
stock: number; // 活动库存
|
||||
randomMinPrice?: number; // 用户每次砍价的最小金额,单位:分
|
||||
randomMaxPrice?: number; // 用户每次砍价的最大金额,单位:分
|
||||
}
|
||||
|
||||
/** 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装 */
|
||||
export interface BargainProduct {
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 砍价起始价格,单位分 */
|
||||
bargainFirstPrice: number;
|
||||
/** 砍价底价 */
|
||||
bargainMinPrice: number;
|
||||
/** 活动库存 */
|
||||
stock: number;
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
bargainFirstPrice: number; // 砍价起始价格,单位分
|
||||
bargainMinPrice: number; // 砍价底价
|
||||
stock: number; // 活动库存
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
/** 砍价活动配置 */
|
||||
productConfig: BargainProduct;
|
||||
productConfig: BargainProduct; // 砍价活动配置
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
skus: SkuExtension[]; // SKU 列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,16 +5,11 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBargainHelpApi {
|
||||
/** 砍价记录 */
|
||||
export interface BargainHelp {
|
||||
/** 记录编号 */
|
||||
id: number;
|
||||
/** 砍价记录编号 */
|
||||
record: number;
|
||||
/** 用户编号 */
|
||||
userId: number;
|
||||
/** 砍掉金额 */
|
||||
reducePrice: number;
|
||||
/** 结束时间 */
|
||||
endTime: Date;
|
||||
id: number; // 记录编号
|
||||
record: number; // 砍价记录编号
|
||||
userId: number; // 用户编号
|
||||
reducePrice: number; // 砍掉金额
|
||||
endTime: Date; // 结束时间
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,26 +5,16 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallBargainRecordApi {
|
||||
/** 砍价记录 */
|
||||
export interface BargainRecord {
|
||||
/** 记录编号 */
|
||||
id: number;
|
||||
/** 活动编号 */
|
||||
activityId: number;
|
||||
/** 用户编号 */
|
||||
userId: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 砍价起始价格 */
|
||||
bargainFirstPrice: number;
|
||||
/** 砍价价格 */
|
||||
bargainPrice: number;
|
||||
/** 状态 */
|
||||
status: number;
|
||||
/** 订单编号 */
|
||||
orderId: number;
|
||||
/** 结束时间 */
|
||||
endTime: Date;
|
||||
id: number; // 记录编号
|
||||
activityId: number; // 活动编号
|
||||
userId: number; // 用户编号
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
bargainFirstPrice: number; // 砍价起始价格
|
||||
bargainPrice: number; // 砍价价格
|
||||
status: number; // 状态
|
||||
orderId: number; // 订单编号
|
||||
endTime: Date; // 结束时间
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,67 +5,42 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallCombinationActivityApi {
|
||||
/** 拼团活动所需属性 */
|
||||
export interface CombinationProduct {
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 拼团价格 */
|
||||
combinationPrice: number;
|
||||
}
|
||||
/** 拼团活动 */
|
||||
export interface CombinationActivity {
|
||||
/** 活动编号 */
|
||||
id?: number;
|
||||
/** 活动名称 */
|
||||
name?: string;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 总限购数量 */
|
||||
totalLimitCount?: number;
|
||||
/** 单次限购数量 */
|
||||
singleLimitCount?: number;
|
||||
/** 开始时间 */
|
||||
startTime?: Date;
|
||||
/** 结束时间 */
|
||||
endTime?: Date;
|
||||
/** 用户数量 */
|
||||
userSize?: number;
|
||||
/** 总数量 */
|
||||
totalCount?: number;
|
||||
/** 成功数量 */
|
||||
successCount?: number;
|
||||
/** 订单用户数量 */
|
||||
orderUserCount?: number;
|
||||
/** 虚拟成团 */
|
||||
virtualGroup?: number;
|
||||
/** 状态 */
|
||||
status?: number;
|
||||
/** 限制时长 */
|
||||
limitDuration?: number;
|
||||
/** 拼团价格 */
|
||||
combinationPrice?: number;
|
||||
/** 商品列表 */
|
||||
products: CombinationProduct[];
|
||||
/** 图片 */
|
||||
picUrl?: string;
|
||||
/** 商品名称 */
|
||||
spuName?: string;
|
||||
/** 市场价 */
|
||||
marketPrice?: number;
|
||||
id?: number; // 活动编号
|
||||
name?: string; // 活动名称
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
totalLimitCount?: number; // 总限购数量
|
||||
singleLimitCount?: number; // 单次限购数量
|
||||
startTime?: Date; // 开始时间
|
||||
endTime?: Date; // 结束时间
|
||||
userSize?: number; // 用户数量
|
||||
totalCount?: number; // 总数量
|
||||
successCount?: number; // 成功数量
|
||||
orderUserCount?: number; // 订单用户数量
|
||||
virtualGroup?: number; // 虚拟成团
|
||||
status?: number; // 状态
|
||||
limitDuration?: number; // 限制时长
|
||||
combinationPrice?: number; // 拼团价格
|
||||
products: CombinationProduct[]; // 商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 拼团活动所需属性 */
|
||||
export interface CombinationProduct {
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
combinationPrice: number; // 拼团价格
|
||||
}
|
||||
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
/** 拼团活动配置 */
|
||||
productConfig: CombinationProduct;
|
||||
productConfig: CombinationProduct; // 拼团活动配置
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
skus: SkuExtension[]; // SKU 列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,44 +5,27 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallCombinationRecordApi {
|
||||
/** 拼团记录 */
|
||||
export interface CombinationRecord {
|
||||
/** 拼团记录编号 */
|
||||
id: number;
|
||||
/** 拼团活动编号 */
|
||||
activityId: number;
|
||||
/** 用户昵称 */
|
||||
nickname: string;
|
||||
/** 用户头像 */
|
||||
avatar: string;
|
||||
/** 团长编号 */
|
||||
headId: number;
|
||||
/** 过期时间 */
|
||||
expireTime: string;
|
||||
/** 可参团人数 */
|
||||
userSize: number;
|
||||
/** 已参团人数 */
|
||||
userCount: number;
|
||||
/** 拼团状态 */
|
||||
status: number;
|
||||
/** 商品名字 */
|
||||
spuName: string;
|
||||
/** 商品图片 */
|
||||
picUrl: string;
|
||||
/** 是否虚拟成团 */
|
||||
virtualGroup: boolean;
|
||||
/** 开始时间 (订单付款后开始的时间) */
|
||||
startTime: string;
|
||||
/** 结束时间(成团时间/失败时间) */
|
||||
endTime: string;
|
||||
id: number; // 拼团记录编号
|
||||
activityId: number; // 拼团活动编号
|
||||
nickname: string; // 用户昵称
|
||||
avatar: string; // 用户头像
|
||||
headId: number; // 团长编号
|
||||
expireTime: string; // 过期时间
|
||||
userSize: number; // 可参团人数
|
||||
userCount: number; // 已参团人数
|
||||
status: number; // 拼团状态
|
||||
spuName: string; // 商品名字
|
||||
picUrl: string; // 商品图片
|
||||
virtualGroup: boolean; // 是否虚拟成团
|
||||
startTime: string; // 开始时间 (订单付款后开始的时间)
|
||||
endTime: string; // 结束时间(成团时间/失败时间)
|
||||
}
|
||||
|
||||
/** 拼团记录概要信息 */
|
||||
export interface RecordSummary {
|
||||
/** 待成团数量 */
|
||||
pendingCount: number;
|
||||
/** 已成团数量 */
|
||||
successCount: number;
|
||||
/** 已失败数量 */
|
||||
failCount: number;
|
||||
pendingCount: number; // 待成团数量
|
||||
successCount: number; // 已成团数量
|
||||
failCount: number; // 已失败数量
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,48 +7,34 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallDiscountActivityApi {
|
||||
/** 限时折扣相关属性 */
|
||||
export interface DiscountProduct {
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 折扣类型 */
|
||||
discountType: number;
|
||||
/** 折扣百分比 */
|
||||
discountPercent: number;
|
||||
/** 折扣价格 */
|
||||
discountPrice: number;
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
discountType: number; // 折扣类型
|
||||
discountPercent: number; // 折扣百分比
|
||||
discountPrice: number; // 折扣价格
|
||||
}
|
||||
|
||||
/** 限时折扣活动 */
|
||||
export interface DiscountActivity {
|
||||
/** 活动编号 */
|
||||
id?: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 活动名称 */
|
||||
name?: string;
|
||||
/** 状态 */
|
||||
status?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 开始时间 */
|
||||
startTime?: Date;
|
||||
/** 结束时间 */
|
||||
endTime?: Date;
|
||||
/** 商品列表 */
|
||||
products?: DiscountProduct[];
|
||||
id?: number; // 活动编号
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
name?: string; // 活动名称
|
||||
status?: number; // 状态
|
||||
remark?: string; // 备注
|
||||
startTime?: Date; // 开始时间
|
||||
endTime?: Date; // 结束时间
|
||||
products?: DiscountProduct[]; // 商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
/** 限时折扣配置 */
|
||||
productConfig: DiscountProduct;
|
||||
productConfig: DiscountProduct; // 限时折扣配置
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
skus: SkuExtension[]; // SKU 列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,18 +5,12 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallDiyPageApi {
|
||||
/** 装修页面 */
|
||||
export interface DiyPage {
|
||||
/** 页面编号 */
|
||||
id?: number;
|
||||
/** 模板编号 */
|
||||
templateId?: number;
|
||||
/** 页面名称 */
|
||||
name: string;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 预览图片地址数组 */
|
||||
previewPicUrls: string[];
|
||||
/** 页面属性 */
|
||||
property: string;
|
||||
id?: number; // 页面编号
|
||||
templateId?: number; // 模板编号
|
||||
name: string; // 页面名称
|
||||
remark: string; // 备注
|
||||
previewPicUrls: string[]; // 预览图片地址数组
|
||||
property: string; // 页面属性
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,26 +7,18 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallDiyTemplateApi {
|
||||
/** 装修模板 */
|
||||
export interface DiyTemplate {
|
||||
/** 模板编号 */
|
||||
id?: number;
|
||||
/** 模板名称 */
|
||||
name: string;
|
||||
/** 是否使用 */
|
||||
used: boolean;
|
||||
/** 使用时间 */
|
||||
usedTime?: Date;
|
||||
/** 备注 */
|
||||
remark: string;
|
||||
/** 预览图片地址数组 */
|
||||
previewPicUrls: string[];
|
||||
/** 模板属性 */
|
||||
property: string;
|
||||
id?: number; // 模板编号
|
||||
name: string; // 模板名称
|
||||
used: boolean; // 是否使用
|
||||
usedTime?: Date; // 使用时间
|
||||
remark: string; // 备注
|
||||
previewPicUrls: string[]; // 预览图片地址数组
|
||||
property: string; // 模板属性
|
||||
}
|
||||
|
||||
/** 装修模板属性(包含页面列表) */
|
||||
export interface DiyTemplateProperty extends DiyTemplate {
|
||||
/** 页面列表 */
|
||||
pages: MallDiyPageApi.DiyPage[];
|
||||
pages: MallDiyPageApi.DiyPage[]; // 页面列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export namespace MallKefuConversationApi {
|
||||
}
|
||||
|
||||
/** 会话置顶请求 */
|
||||
export interface ConversationPinnedUpdate {
|
||||
export interface ConversationPinnedUpdateReqVO {
|
||||
id: number; // 会话编号
|
||||
pinned: boolean; // 是否置顶
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export function getConversation(id: number) {
|
||||
|
||||
/** 客服会话置顶 */
|
||||
export function updateConversationPinned(
|
||||
data: MallKefuConversationApi.ConversationPinnedUpdate,
|
||||
data: MallKefuConversationApi.ConversationPinnedUpdateReqVO,
|
||||
) {
|
||||
return requestClient.put(
|
||||
'/promotion/kefu-conversation/update-conversation-pinned',
|
||||
|
||||
@@ -24,11 +24,6 @@ export namespace MallKefuMessageApi {
|
||||
contentType: number; // 消息类型
|
||||
content: string; // 消息内容
|
||||
}
|
||||
|
||||
/** 消息列表查询参数 */
|
||||
export interface MessageQuery extends PageParam {
|
||||
conversationId: number; // 会话编号
|
||||
}
|
||||
}
|
||||
|
||||
/** 发送客服消息 */
|
||||
@@ -44,7 +39,7 @@ export function updateKeFuMessageReadStatus(conversationId: number) {
|
||||
}
|
||||
|
||||
/** 获得消息列表(流式加载) */
|
||||
export function getKeFuMessageList(params: MallKefuMessageApi.MessageQuery) {
|
||||
export function getKeFuMessageList(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallKefuMessageApi.Message>>(
|
||||
'/promotion/kefu-message/list',
|
||||
{ params },
|
||||
|
||||
@@ -7,80 +7,52 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallPointActivityApi {
|
||||
/** 积分商城商品 */
|
||||
export interface PointProduct {
|
||||
/** 积分商城商品编号 */
|
||||
id?: number;
|
||||
/** 积分商城活动 id */
|
||||
activityId?: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 可兑换数量 */
|
||||
count: number;
|
||||
/** 兑换积分 */
|
||||
point: number;
|
||||
/** 兑换金额,单位:分 */
|
||||
price: number;
|
||||
/** 积分商城商品库存 */
|
||||
stock: number;
|
||||
/** 积分商城商品状态 */
|
||||
activityStatus?: number;
|
||||
id?: number; // 积分商城商品编号
|
||||
activityId?: number; // 积分商城活动 id
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
count: number; // 可兑换数量
|
||||
point: number; // 兑换积分
|
||||
price: number; // 兑换金额,单位:分
|
||||
stock: number; // 积分商城商品库存
|
||||
activityStatus?: number; // 积分商城商品状态
|
||||
}
|
||||
|
||||
/** 积分商城活动 */
|
||||
export interface PointActivity {
|
||||
/** 积分商城活动编号 */
|
||||
id: number;
|
||||
/** 积分商城活动商品 */
|
||||
spuId: number;
|
||||
/** 活动状态 */
|
||||
status: number;
|
||||
/** 积分商城活动库存 */
|
||||
stock: number;
|
||||
/** 积分商城活动总库存 */
|
||||
totalStock: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 排序 */
|
||||
sort: number;
|
||||
/** 创建时间 */
|
||||
createTime: string;
|
||||
/** 积分商城商品 */
|
||||
products: PointProduct[];
|
||||
/** 商品名称 */
|
||||
spuName: string;
|
||||
/** 商品主图 */
|
||||
picUrl: string;
|
||||
/** 商品市场价,单位:分 */
|
||||
marketPrice: number;
|
||||
/** 兑换积分 */
|
||||
point: number;
|
||||
/** 兑换金额,单位:分 */
|
||||
price: number;
|
||||
id: number; // 积分商城活动编号
|
||||
spuId: number; // 积分商城活动商品
|
||||
status: number; // 活动状态
|
||||
stock: number; // 积分商城活动库存
|
||||
totalStock: number; // 积分商城活动总库存
|
||||
remark?: string; // 备注
|
||||
sort: number; // 排序
|
||||
createTime: string; // 创建时间
|
||||
products: PointProduct[]; // 积分商城商品
|
||||
spuName: string; // 商品名称
|
||||
picUrl: string; // 商品主图
|
||||
marketPrice: number; // 商品市场价,单位:分
|
||||
point: number; // 兑换积分
|
||||
price: number; // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// TODO @puhui999:这些还需要么?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
/** 积分商城商品配置 */
|
||||
productConfig: PointProduct;
|
||||
productConfig: PointProduct; // 积分商城商品配置
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
skus: SkuExtension[]; // SKU 列表
|
||||
}
|
||||
|
||||
/** 扩展 SPU 配置(带积分信息) */
|
||||
export interface SpuExtensionWithPoint extends MallSpuApi.Spu {
|
||||
/** 积分商城活动库存 */
|
||||
pointStock: number;
|
||||
/** 积分商城活动总库存 */
|
||||
pointTotalStock: number;
|
||||
/** 兑换积分 */
|
||||
point: number;
|
||||
/** 兑换金额,单位:分 */
|
||||
pointPrice: number;
|
||||
pointStock: number; // 积分商城活动库存
|
||||
pointTotalStock: number; // 积分商城活动总库存
|
||||
point: number; // 兑换积分
|
||||
pointPrice: number; // 兑换金额,单位:分
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,48 +5,30 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallRewardActivityApi {
|
||||
/** 优惠规则 */
|
||||
export interface RewardRule {
|
||||
/** 满足金额 */
|
||||
limit?: number;
|
||||
/** 优惠金额 */
|
||||
discountPrice?: number;
|
||||
/** 是否包邮 */
|
||||
freeDelivery?: boolean;
|
||||
/** 赠送积分 */
|
||||
point: number;
|
||||
/** 赠送优惠券数量 */
|
||||
limit?: number; // 满足金额
|
||||
discountPrice?: number; // 优惠金额
|
||||
freeDelivery?: boolean; // 是否包邮
|
||||
point: number; // 赠送积分
|
||||
giveCouponTemplateCounts?: {
|
||||
[key: number]: number;
|
||||
};
|
||||
}; // 赠送优惠券数量
|
||||
}
|
||||
|
||||
/** 满减送活动 */
|
||||
export interface RewardActivity {
|
||||
/** 活动编号 */
|
||||
id?: number;
|
||||
/** 活动名称 */
|
||||
name?: string;
|
||||
/** 开始时间 */
|
||||
startTime?: Date;
|
||||
/** 结束时间 */
|
||||
endTime?: Date;
|
||||
/** 开始和结束时间(仅前端使用) */
|
||||
startAndEndTime?: Date[];
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 条件类型 */
|
||||
conditionType?: number;
|
||||
/** 商品范围 */
|
||||
productScope?: number;
|
||||
/** 优惠规则列表 */
|
||||
rules: RewardRule[];
|
||||
/** 商品范围值(仅表单使用):值为品类编号列表、商品编号列表 */
|
||||
productScopeValues?: number[];
|
||||
/** 商品分类编号列表(仅表单使用) */
|
||||
productCategoryIds?: number[];
|
||||
/** 商品 SPU 编号列表(仅表单使用) */
|
||||
productSpuIds?: number[];
|
||||
/** 状态 */
|
||||
status?: number;
|
||||
id?: number; // 活动编号
|
||||
name?: string; // 活动名称
|
||||
status?: number; // 活动状态
|
||||
startTime?: Date; // 开始时间
|
||||
endTime?: Date; // 结束时间
|
||||
startAndEndTime?: Date[]; // 开始和结束时间(仅前端使用)
|
||||
remark?: string; // 备注
|
||||
conditionType?: number; // 条件类型
|
||||
productScope?: number; // 商品范围
|
||||
rules: RewardRule[]; // 优惠规则列表
|
||||
productScopeValues?: number[]; // 商品范围值(仅表单使用):值为品类编号列表、商品编号列表
|
||||
productCategoryIds?: number[]; // 商品分类编号列表(仅表单使用)
|
||||
productSpuIds?: number[]; // 商品 SPU 编号列表(仅表单使用)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,72 +7,43 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallSeckillActivityApi {
|
||||
/** 秒杀商品 */
|
||||
export interface SeckillProduct {
|
||||
/** 商品 SKU 编号 */
|
||||
skuId: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId: number;
|
||||
/** 秒杀价格 */
|
||||
seckillPrice: number;
|
||||
/** 秒杀库存 */
|
||||
stock: number;
|
||||
skuId: number; // 商品 SKU 编号
|
||||
spuId: number; // 商品 SPU 编号
|
||||
seckillPrice: number; // 秒杀价格
|
||||
stock: number; // 秒杀库存
|
||||
}
|
||||
|
||||
/** 秒杀活动 */
|
||||
export interface SeckillActivity {
|
||||
/** 活动编号 */
|
||||
id?: number;
|
||||
/** 商品 SPU 编号 */
|
||||
spuId?: number;
|
||||
/** 活动名称 */
|
||||
name?: string;
|
||||
/** 活动状态 */
|
||||
status?: number;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 开始时间 */
|
||||
startTime: Date;
|
||||
/** 结束时间 */
|
||||
endTime: Date;
|
||||
/** 排序 */
|
||||
sort?: number;
|
||||
/** 配置编号 */
|
||||
configIds?: number[];
|
||||
/** 订单数量 */
|
||||
orderCount?: number;
|
||||
/** 用户数量 */
|
||||
userCount?: number;
|
||||
/** 总金额 */
|
||||
totalPrice?: number;
|
||||
/** 总限购数量 */
|
||||
totalLimitCount?: number;
|
||||
/** 单次限购数量 */
|
||||
singleLimitCount?: number;
|
||||
/** 秒杀库存 */
|
||||
stock?: number;
|
||||
/** 秒杀总库存 */
|
||||
totalStock?: number;
|
||||
/** 秒杀价格 */
|
||||
seckillPrice?: number;
|
||||
/** 秒杀商品列表 */
|
||||
products?: SeckillProduct[];
|
||||
/** 图片 */
|
||||
picUrl?: string;
|
||||
/** 商品名称 */
|
||||
spuName?: string;
|
||||
/** 市场价 */
|
||||
marketPrice?: number;
|
||||
id?: number; // 活动编号
|
||||
spuId?: number; // 商品 SPU 编号
|
||||
name?: string; // 活动名称
|
||||
status?: number; // 活动状态
|
||||
remark?: string; // 备注
|
||||
startTime?: Date; // 开始时间
|
||||
endTime?: Date; // 结束时间
|
||||
sort?: number; // 排序
|
||||
configIds?: string; // 配置编号
|
||||
orderCount?: number; // 订单数量
|
||||
userCount?: number; // 用户数量
|
||||
totalPrice?: number; // 总金额
|
||||
totalLimitCount?: number; // 总限购数量
|
||||
singleLimitCount?: number; // 单次限购数量
|
||||
stock?: number; // 秒杀库存
|
||||
totalStock?: number; // 秒杀总库存
|
||||
seckillPrice?: number; // 秒杀价格
|
||||
products?: SeckillProduct[]; // 秒杀商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:这些还需要么?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
/** 秒杀商品配置 */
|
||||
productConfig: SeckillProduct;
|
||||
productConfig: SeckillProduct; // 秒杀商品配置
|
||||
} & MallSpuApi.Sku;
|
||||
|
||||
/** 扩展 SPU 配置 */
|
||||
export interface SpuExtension extends MallSpuApi.Spu {
|
||||
/** SKU 列表 */
|
||||
skus: SkuExtension[];
|
||||
skus: SkuExtension[]; // SKU 列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,26 +5,12 @@ import { requestClient } from '#/api/request';
|
||||
export namespace MallSeckillConfigApi {
|
||||
/** 秒杀时段 */
|
||||
export interface SeckillConfig {
|
||||
/** 编号 */
|
||||
id: number;
|
||||
/** 秒杀时段名称 */
|
||||
name: string;
|
||||
/** 开始时间点 */
|
||||
startTime: string;
|
||||
/** 结束时间点 */
|
||||
endTime: string;
|
||||
/** 秒杀轮播图 */
|
||||
sliderPicUrls: string[];
|
||||
/** 活动状态 */
|
||||
status: number;
|
||||
}
|
||||
|
||||
/** 时段配置状态更新 */
|
||||
export interface StatusUpdate {
|
||||
/** 编号 */
|
||||
id: number;
|
||||
/** 状态 */
|
||||
status: number;
|
||||
id: number; // 编号
|
||||
name: string; // 秒杀时段名称
|
||||
startTime: string; // 开始时间点
|
||||
endTime: string; // 结束时间点
|
||||
sliderPicUrls: string[]; // 秒杀轮播图
|
||||
status: number; // 活动状态
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MpStatisticsApi {
|
||||
/** 统计查询参数 */
|
||||
export interface StatisticsQuery {
|
||||
export interface StatisticsGetReqVO {
|
||||
accountId: number;
|
||||
date: Date[];
|
||||
}
|
||||
|
||||
/** 消息发送概况数据 */
|
||||
export interface UpstreamMessage {
|
||||
export interface StatisticsUpstreamMessageRespVO {
|
||||
refDate: string;
|
||||
msgType: string;
|
||||
msgUser: number;
|
||||
@@ -16,7 +16,7 @@ export namespace MpStatisticsApi {
|
||||
}
|
||||
|
||||
/** 用户增减数据 */
|
||||
export interface UserSummary {
|
||||
export interface StatisticsUserSummaryRespVO {
|
||||
refDate: string;
|
||||
userSource: number;
|
||||
newUser: number;
|
||||
@@ -25,13 +25,13 @@ export namespace MpStatisticsApi {
|
||||
}
|
||||
|
||||
/** 用户累计数据 */
|
||||
export interface UserCumulate {
|
||||
export interface StatisticsUserCumulateRespVO {
|
||||
refDate: string;
|
||||
cumulateUser: number;
|
||||
}
|
||||
|
||||
/** 接口分析数据 */
|
||||
export interface InterfaceSummary {
|
||||
export interface StatisticsInterfaceSummaryRespVO {
|
||||
refDate: string;
|
||||
callbackCount: number;
|
||||
failCount: number;
|
||||
@@ -41,8 +41,8 @@ export namespace MpStatisticsApi {
|
||||
}
|
||||
|
||||
/** 获取消息发送概况数据 */
|
||||
export function getUpstreamMessage(params: MpStatisticsApi.StatisticsQuery) {
|
||||
return requestClient.get<MpStatisticsApi.UpstreamMessage[]>(
|
||||
export function getUpstreamMessage(params: MpStatisticsApi.StatisticsGetReqVO) {
|
||||
return requestClient.get<MpStatisticsApi.StatisticsUpstreamMessageRespVO[]>(
|
||||
'/mp/statistics/upstream-message',
|
||||
{
|
||||
params,
|
||||
@@ -51,8 +51,8 @@ export function getUpstreamMessage(params: MpStatisticsApi.StatisticsQuery) {
|
||||
}
|
||||
|
||||
/** 获取用户增减数据 */
|
||||
export function getUserSummary(params: MpStatisticsApi.StatisticsQuery) {
|
||||
return requestClient.get<MpStatisticsApi.UserSummary[]>(
|
||||
export function getUserSummary(params: MpStatisticsApi.StatisticsGetReqVO) {
|
||||
return requestClient.get<MpStatisticsApi.StatisticsUserSummaryRespVO[]>(
|
||||
'/mp/statistics/user-summary',
|
||||
{
|
||||
params,
|
||||
@@ -61,8 +61,8 @@ export function getUserSummary(params: MpStatisticsApi.StatisticsQuery) {
|
||||
}
|
||||
|
||||
/** 获取用户累计数据 */
|
||||
export function getUserCumulate(params: MpStatisticsApi.StatisticsQuery) {
|
||||
return requestClient.get<MpStatisticsApi.UserCumulate[]>(
|
||||
export function getUserCumulate(params: MpStatisticsApi.StatisticsGetReqVO) {
|
||||
return requestClient.get<MpStatisticsApi.StatisticsUserCumulateRespVO[]>(
|
||||
'/mp/statistics/user-cumulate',
|
||||
{
|
||||
params,
|
||||
@@ -71,8 +71,10 @@ export function getUserCumulate(params: MpStatisticsApi.StatisticsQuery) {
|
||||
}
|
||||
|
||||
/** 获取接口分析数据 */
|
||||
export function getInterfaceSummary(params: MpStatisticsApi.StatisticsQuery) {
|
||||
return requestClient.get<MpStatisticsApi.InterfaceSummary[]>(
|
||||
export function getInterfaceSummary(
|
||||
params: MpStatisticsApi.StatisticsGetReqVO,
|
||||
) {
|
||||
return requestClient.get<MpStatisticsApi.StatisticsInterfaceSummaryRespVO[]>(
|
||||
'/mp/statistics/interface-summary',
|
||||
{
|
||||
params,
|
||||
|
||||
@@ -11,12 +11,6 @@ export namespace MpTagApi {
|
||||
count?: number;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
/** 标签分页查询参数 */
|
||||
export interface TagPageQuery extends PageParam {
|
||||
accountId?: number;
|
||||
name?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建公众号标签 */
|
||||
@@ -44,7 +38,7 @@ export function getTag(id: number) {
|
||||
}
|
||||
|
||||
/** 获取公众号标签分页 */
|
||||
export function getTagPage(params: MpTagApi.TagPageQuery) {
|
||||
export function getTagPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MpTagApi.Tag>>('/mp/tag/page', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -20,21 +20,14 @@ export namespace PayAppApi {
|
||||
}
|
||||
|
||||
/** 更新状态请求 */
|
||||
export interface UpdateStatusReq {
|
||||
export interface AppUpdateStatusReqVO {
|
||||
id: number;
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface AppPageReqVO extends PageParam {
|
||||
name?: string;
|
||||
appKey?: string;
|
||||
status?: number;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付应用列表 */
|
||||
export function getAppPage(params: PayAppApi.AppPageReqVO) {
|
||||
export function getAppPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
|
||||
params,
|
||||
});
|
||||
@@ -56,7 +49,7 @@ export function updateApp(data: PayAppApi.App) {
|
||||
}
|
||||
|
||||
/** 修改支付应用状态 */
|
||||
export function updateAppStatus(data: PayAppApi.UpdateStatusReq) {
|
||||
export function updateAppStatus(data: PayAppApi.AppUpdateStatusReqVO) {
|
||||
return requestClient.put('/pay/app/update-status', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace PayChannelApi {
|
||||
@@ -16,16 +14,6 @@ export namespace PayChannelApi {
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付渠道列表 */
|
||||
export function getChannelPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayChannelApi.Channel>>(
|
||||
'/pay/channel/page',
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询支付渠道详情 */
|
||||
export function getChannel(appId: number, code: string) {
|
||||
return requestClient.get<PayChannelApi.Channel>('/pay/channel/get', {
|
||||
@@ -42,13 +30,3 @@ export function createChannel(data: PayChannelApi.Channel) {
|
||||
export function updateChannel(data: PayChannelApi.Channel) {
|
||||
return requestClient.put('/pay/channel/update', data);
|
||||
}
|
||||
|
||||
/** 删除支付渠道 */
|
||||
export function deleteChannel(id: number) {
|
||||
return requestClient.delete(`/pay/channel/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出支付渠道 */
|
||||
export function exportChannel(params: PageParam) {
|
||||
return requestClient.download('/pay/channel/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -19,11 +19,6 @@ export namespace DemoOrderApi {
|
||||
spuId?: number;
|
||||
createTime?: Date;
|
||||
}
|
||||
|
||||
export interface OrderPageReqVO extends PageParam {
|
||||
spuId?: number;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建示例订单 */
|
||||
@@ -32,7 +27,7 @@ export function createDemoOrder(data: DemoOrderApi.Order) {
|
||||
}
|
||||
|
||||
/** 获得示例订单分页 */
|
||||
export function getDemoOrderPage(params: DemoOrderApi.OrderPageReqVO) {
|
||||
export function getDemoOrderPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<DemoOrderApi.Order>>(
|
||||
'/pay/demo-order/page',
|
||||
{
|
||||
|
||||
@@ -22,18 +22,6 @@ export namespace PayNotifyApi {
|
||||
updateTime: Date;
|
||||
logs?: any[];
|
||||
}
|
||||
|
||||
/** 支付通知任务分页请求 */
|
||||
export interface NotifyTaskPageReqVO extends PageParam {
|
||||
appId?: number;
|
||||
type?: number;
|
||||
dataId?: number;
|
||||
status?: number;
|
||||
merchantOrderId?: string;
|
||||
merchantRefundId?: string;
|
||||
merchantTransferId?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 获得支付通知明细 */
|
||||
@@ -42,7 +30,7 @@ export function getNotifyTaskDetail(id: number) {
|
||||
}
|
||||
|
||||
/** 获得支付通知分页 */
|
||||
export function getNotifyTaskPage(params: PayNotifyApi.NotifyTaskPageReqVO) {
|
||||
export function getNotifyTaskPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayNotifyApi.NotifyTask>>(
|
||||
'/pay/notify/page',
|
||||
{
|
||||
|
||||
@@ -38,21 +38,10 @@ export namespace PayOrderApi {
|
||||
createTime: Date;
|
||||
updateTime: Date;
|
||||
}
|
||||
|
||||
/** 支付订单分页请求 */
|
||||
export interface OrderPageReqVO extends PageParam {
|
||||
appId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
channelOrderNo?: string;
|
||||
no?: string;
|
||||
status?: number;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付订单列表 */
|
||||
export function getOrderPage(params: PayOrderApi.OrderPageReqVO) {
|
||||
export function getOrderPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -36,39 +36,10 @@ export namespace PayRefundApi {
|
||||
createTime: Date;
|
||||
updateTime: Date;
|
||||
}
|
||||
|
||||
/** 退款订单分页请求 */
|
||||
export interface RefundPageReqVO extends PageParam {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
orderId?: string;
|
||||
tradeNo?: string;
|
||||
merchantOrderId?: string;
|
||||
merchantRefundNo?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
status?: number;
|
||||
type?: number;
|
||||
payAmount?: number;
|
||||
refundAmount?: number;
|
||||
reason?: string;
|
||||
userIp?: string;
|
||||
channelOrderNo?: string;
|
||||
channelRefundNo?: string;
|
||||
channelErrorCode?: string;
|
||||
channelErrorMsg?: string;
|
||||
channelExtras?: string;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询退款订单列表 */
|
||||
export function getRefundPage(params: PayRefundApi.RefundPageReqVO) {
|
||||
export function getRefundPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayRefundApi.Refund>>(
|
||||
'/pay/refund/page',
|
||||
{
|
||||
|
||||
@@ -25,23 +25,10 @@ export namespace PayTransferApi {
|
||||
notifyUrl: string;
|
||||
channelNotifyData: string;
|
||||
}
|
||||
|
||||
/** 转账单分页请求 */
|
||||
export interface TransferPageReqVO extends PageParam {
|
||||
no?: string;
|
||||
appId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
status?: number;
|
||||
userName?: string;
|
||||
userAccount?: string;
|
||||
channelTransferNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询转账单列表 */
|
||||
export function getTransferPage(params: PayTransferApi.TransferPageReqVO) {
|
||||
export function getTransferPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
|
||||
'/pay/transfer/page',
|
||||
{
|
||||
|
||||
@@ -3,11 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace PayWalletApi {
|
||||
/** 用户钱包查询参数 */
|
||||
export interface PayWalletUserReq {
|
||||
userId: number;
|
||||
}
|
||||
|
||||
/** 钱包信息 */
|
||||
export interface Wallet {
|
||||
id: number;
|
||||
@@ -19,32 +14,27 @@ export namespace PayWalletApi {
|
||||
freezePrice: number;
|
||||
}
|
||||
|
||||
/** 钱包分页请求 */
|
||||
export interface WalletPageReqVO extends PageParam {
|
||||
userId?: number;
|
||||
userType?: number;
|
||||
balance?: number;
|
||||
totalExpense?: number;
|
||||
totalRecharge?: number;
|
||||
freezePrice?: number;
|
||||
/** 钱包查询参数 */
|
||||
export interface WalletUserQueryReqVO {
|
||||
userId: number;
|
||||
}
|
||||
|
||||
/** 钱包修改余额 */
|
||||
export interface PayWalletUpdateBalanceReqVO {
|
||||
export interface WalletUpdateBalanceReqVO {
|
||||
userId: number;
|
||||
balance: number;
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询用户钱包详情 */
|
||||
export function getWallet(params: PayWalletApi.PayWalletUserReq) {
|
||||
export function getWallet(params: PayWalletApi.WalletUserQueryReqVO) {
|
||||
return requestClient.get<PayWalletApi.Wallet>('/pay/wallet/get', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询会员钱包列表 */
|
||||
export function getWalletPage(params: PayWalletApi.WalletPageReqVO) {
|
||||
export function getWalletPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<PayWalletApi.Wallet>>(
|
||||
'/pay/wallet/page',
|
||||
{
|
||||
@@ -55,7 +45,7 @@ export function getWalletPage(params: PayWalletApi.WalletPageReqVO) {
|
||||
|
||||
/** 修改会员钱包余额 */
|
||||
export function updateWalletBalance(
|
||||
data: PayWalletApi.PayWalletUpdateBalanceReqVO,
|
||||
data: PayWalletApi.WalletUpdateBalanceReqVO,
|
||||
) {
|
||||
return requestClient.put('/pay/wallet/update-balance', data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user