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}`);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export namespace AiChatMessageApi {
|
||||
}
|
||||
}
|
||||
|
||||
// 消息列表
|
||||
/** 消息列表 */
|
||||
export function getChatMessageListByConversationId(
|
||||
conversationId: null | number,
|
||||
) {
|
||||
@@ -55,7 +55,7 @@ export function getChatMessageListByConversationId(
|
||||
);
|
||||
}
|
||||
|
||||
// 发送 Stream 消息
|
||||
/** 发送 Stream 消息 */
|
||||
export function sendChatMessageStream(
|
||||
conversationId: number,
|
||||
content: string,
|
||||
@@ -89,25 +89,27 @@ 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',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
// 管理员删除消息
|
||||
|
||||
/** 管理员删除消息 */
|
||||
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,28 +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;
|
||||
formFields?: string[];
|
||||
}
|
||||
|
||||
/** 流程模型 */
|
||||
export interface Model {
|
||||
id: number;
|
||||
@@ -43,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,44 +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;
|
||||
deptName?: 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;
|
||||
@@ -74,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;
|
||||
@@ -84,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;
|
||||
@@ -103,20 +104,17 @@ export namespace BpmProcessInstanceApi {
|
||||
taskId: string;
|
||||
}
|
||||
|
||||
/** 打印数据任务信息 */
|
||||
export interface PrintTask {
|
||||
description: string;
|
||||
id: number;
|
||||
name: string;
|
||||
signPicUrl?: string;
|
||||
}
|
||||
|
||||
/** 打印数据 */
|
||||
export interface PrintData {
|
||||
/** 流程实例的打印数据响应 */
|
||||
export interface ProcessPrintDataRespVO {
|
||||
printTemplateEnable: boolean;
|
||||
printTemplateHtml?: string;
|
||||
processInstance: ProcessInstance;
|
||||
tasks: PrintTask[];
|
||||
tasks: {
|
||||
description: string;
|
||||
id: number;
|
||||
name: string;
|
||||
signPicUrl?: string;
|
||||
}[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,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 },
|
||||
);
|
||||
@@ -208,14 +206,6 @@ 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>(
|
||||
@@ -225,7 +215,7 @@ export async function getProcessInstanceBpmnModelView(id: string) {
|
||||
|
||||
/** 获取流程实例打印数据 */
|
||||
export async function getProcessInstancePrintData(id: string) {
|
||||
return requestClient.get<BpmProcessInstanceApi.PrintData>(
|
||||
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;
|
||||
|
||||
@@ -3,12 +3,6 @@ import type { PageParam, PageResult } from '@vben/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallCommentApi {
|
||||
export interface Property {
|
||||
propertyId: number; // 属性 ID
|
||||
propertyName: string; // 属性名称
|
||||
valueId: number; // 属性值 ID
|
||||
valueName: string; // 属性值名称
|
||||
}
|
||||
/** 商品评论 */
|
||||
export interface Comment {
|
||||
id: number; // 评论编号
|
||||
@@ -32,17 +26,22 @@ export namespace MallCommentApi {
|
||||
replyContent: string; // 回复内容
|
||||
replyTime: Date; // 回复时间
|
||||
createTime: Date; // 创建时间
|
||||
skuProperties: Property[]; // SKU 属性数组
|
||||
skuProperties: {
|
||||
propertyId: number; // 属性 ID
|
||||
propertyName: string; // 属性名称
|
||||
valueId: number; // 属性值 ID
|
||||
valueName: string; // 属性值名称
|
||||
}[]; // SKU 属性数组
|
||||
}
|
||||
|
||||
/** 评论可见性更新 */
|
||||
export interface CommentVisibleUpdate {
|
||||
/** 评论可见性更新请求 */
|
||||
export interface CommentVisibleUpdateReqVO {
|
||||
id: number; // 评论编号
|
||||
visible: boolean; // 是否可见
|
||||
}
|
||||
|
||||
/** 评论回复 */
|
||||
export interface CommentReply {
|
||||
/** 评论回复请求 */
|
||||
export interface CommentReplyReqVO {
|
||||
id: number; // 评论编号
|
||||
replyContent: string; // 回复内容
|
||||
}
|
||||
@@ -70,12 +69,12 @@ export function createComment(data: MallCommentApi.Comment) {
|
||||
|
||||
/** 显示 / 隐藏评论 */
|
||||
export function updateCommentVisible(
|
||||
data: MallCommentApi.CommentVisibleUpdate,
|
||||
data: MallCommentApi.CommentVisibleUpdateReqVO,
|
||||
) {
|
||||
return requestClient.put('/product/comment/update-visible', data);
|
||||
}
|
||||
|
||||
/** 商家回复 */
|
||||
export function replyComment(data: MallCommentApi.CommentReply) {
|
||||
export function replyComment(data: MallCommentApi.CommentReplyReqVO) {
|
||||
return requestClient.put('/product/comment/reply', data);
|
||||
}
|
||||
@@ -12,9 +12,7 @@ export namespace MallHistoryApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得商品浏览记录分页
|
||||
*/
|
||||
/** 获得商品浏览记录分页 */
|
||||
export function getBrowseHistoryPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<MallHistoryApi.BrowseHistory>>(
|
||||
'/product/browse-history/page',
|
||||
@@ -17,11 +17,6 @@ export namespace MallPropertyApi {
|
||||
name: string; // 名称
|
||||
remark?: string; // 备注
|
||||
}
|
||||
|
||||
/** 属性值查询参数 */
|
||||
export interface PropertyValueQuery extends PageParam {
|
||||
propertyId?: number; // 属性编号
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建属性项 */
|
||||
@@ -62,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 },
|
||||
@@ -3,39 +3,6 @@ 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 {
|
||||
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 GiveCouponTemplate {
|
||||
id?: number; // 优惠券编号
|
||||
name?: string; // 优惠券名称
|
||||
}
|
||||
|
||||
/** 商品 SPU */
|
||||
export interface Spu {
|
||||
id?: number; // 商品编号
|
||||
@@ -68,8 +35,42 @@ export namespace MallSpuApi {
|
||||
browseCount?: number; // 浏览量
|
||||
}
|
||||
|
||||
/** 商品状态更新 */
|
||||
export interface StatusUpdate {
|
||||
/** 商品 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; // 商品状态
|
||||
}
|
||||
@@ -98,7 +99,7 @@ export function updateSpu(data: MallSpuApi.Spu) {
|
||||
}
|
||||
|
||||
/** 更新商品 SPU 状态 */
|
||||
export function updateStatus(data: MallSpuApi.StatusUpdate) {
|
||||
export function updateStatus(data: MallSpuApi.SpuStatusUpdateReqVO) {
|
||||
return requestClient.put('/product/spu/update-status', data);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ export namespace MallBargainActivityApi {
|
||||
stock: number; // 活动库存
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
productConfig: BargainProduct; // 砍价活动配置
|
||||
|
||||
@@ -5,12 +5,6 @@ import type { MallSpuApi } from '#/api/mall/product/spu';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MallCombinationActivityApi {
|
||||
/** 拼团活动所需属性 */
|
||||
export interface CombinationProduct {
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
combinationPrice: number; // 拼团价格
|
||||
}
|
||||
/** 拼团活动 */
|
||||
export interface CombinationActivity {
|
||||
id?: number; // 活动编号
|
||||
@@ -31,6 +25,14 @@ export namespace MallCombinationActivityApi {
|
||||
products: CombinationProduct[]; // 商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 拼团活动所需属性 */
|
||||
export interface CombinationProduct {
|
||||
spuId: number; // 商品 SPU 编号
|
||||
skuId: number; // 商品 SKU 编号
|
||||
combinationPrice: number; // 拼团价格
|
||||
}
|
||||
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
productConfig: CombinationProduct; // 拼团活动配置
|
||||
|
||||
@@ -26,6 +26,7 @@ export namespace MallDiscountActivityApi {
|
||||
products?: DiscountProduct[]; // 商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:要不要删除?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
productConfig: DiscountProduct; // 限时折扣配置
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -36,6 +36,7 @@ export namespace MallPointActivityApi {
|
||||
price: number; // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// TODO @puhui999:这些还需要么?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
productConfig: PointProduct; // 积分商城商品配置
|
||||
|
||||
@@ -35,6 +35,7 @@ export namespace MallSeckillActivityApi {
|
||||
products?: SeckillProduct[]; // 秒杀商品列表
|
||||
}
|
||||
|
||||
// TODO @puhui999:这些还需要么?
|
||||
/** 扩展 SKU 配置 */
|
||||
export type SkuExtension = {
|
||||
productConfig: SeckillProduct; // 秒杀商品配置
|
||||
|
||||
@@ -12,12 +12,6 @@ export namespace MallSeckillConfigApi {
|
||||
sliderPicUrls: string[]; // 秒杀轮播图
|
||||
status: number; // 活动状态
|
||||
}
|
||||
|
||||
/** 时段配置状态更新 */
|
||||
export interface StatusUpdate {
|
||||
id: number; // 编号
|
||||
status: number; // 状态
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询秒杀时段分页 */
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import { MaterialType } from '@vben/constants';
|
||||
|
||||
/** 素材类型枚举 */
|
||||
// TODO @xingyu:芋艿,可能要整理下枚举;
|
||||
export enum MaterialType {
|
||||
IMAGE = 1, // 图片
|
||||
THUMB = 4, // 缩略图
|
||||
VIDEO = 3, // 视频
|
||||
VOICE = 2, // 语音
|
||||
}
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MpMaterialApi {
|
||||
/** 素材信息 */
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
import { MenuType } from '@vben/constants';
|
||||
|
||||
/** 菜单类型枚举 */
|
||||
// TODO @xingyu:芋艿,可能要整理下枚举;
|
||||
export enum MenuType {
|
||||
CLICK = 'click', // 点击推事件
|
||||
LOCATION_SELECT = 'location_select', // 发送位置
|
||||
MEDIA_ID = 'media_id', // 下发消息
|
||||
MINIPROGRAM = 'miniprogram', // 小程序
|
||||
PIC_PHOTO_OR_ALBUM = 'pic_photo_or_album', // 拍照或者相册发图
|
||||
PIC_SYSPHOTO = 'pic_sysphoto', // 系统拍照发图
|
||||
PIC_WEIXIN = 'pic_weixin', // 微信相册发图
|
||||
SCANCODE_PUSH = 'scancode_push', // 扫码推事件
|
||||
SCANCODE_WAITMSG = 'scancode_waitmsg', // 扫码带提示
|
||||
VIEW = 'view', // 跳转 URL
|
||||
VIEW_LIMITED = 'view_limited', // 跳转图文消息URL
|
||||
}
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MpMenuApi {
|
||||
/** 菜单按钮信息 */
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import { MessageType } from '@vben/constants';
|
||||
|
||||
/** 消息类型枚举 */
|
||||
// TODO @xingyu:芋艿,可能要整理下枚举;
|
||||
export enum MessageType {
|
||||
IMAGE = 'image', // 图片消息
|
||||
MPNEWS = 'mpnews', // 公众号图文消息
|
||||
MUSIC = 'music', // 音乐消息
|
||||
NEWS = 'news', // 图文消息
|
||||
TEXT = 'text', // 文本消息
|
||||
VIDEO = 'video', // 视频消息
|
||||
VOICE = 'voice', // 语音消息
|
||||
WXCARD = 'wxcard', // 卡券消息
|
||||
}
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace MpMessageApi {
|
||||
/** 消息信息 */
|
||||
|
||||
@@ -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