From deb30281010f70ba74430ae709f06515f7364ba9 Mon Sep 17 00:00:00 2001 From: chenyuan <1154693969@qq.com> Date: Tue, 17 Dec 2024 10:56:05 +0800 Subject: [PATCH] fix api --- src/api/bpm/activity/index.ts | 8 -- src/api/bpm/category/index.ts | 10 ++ src/api/bpm/definition/index.ts | 2 +- src/api/bpm/model/index.ts | 21 ++++- src/api/bpm/processInstance/index.ts | 53 +++++++++-- src/api/bpm/simple/index.ts | 15 +++ src/api/bpm/task/index.ts | 55 ++++++++++- src/api/infra/jobLog/index.ts | 1 + src/api/mall/product/history.ts | 10 ++ src/api/mall/product/property.ts | 24 ++--- src/api/mall/product/spu.ts | 2 + .../combination/combinationActivity.ts | 8 +- .../mall/promotion/coupon/couponTemplate.ts | 2 +- .../mall/promotion/kefu/conversation/index.ts | 39 ++++++++ src/api/mall/promotion/kefu/message/index.ts | 36 ++++++++ src/api/mall/promotion/point/index.ts | 91 +++++++++++++++++++ .../mall/promotion/reward/rewardActivity.ts | 32 ++++--- .../mall/promotion/seckill/seckillActivity.ts | 7 ++ .../mall/promotion/seckill/seckillConfig.ts | 2 +- .../mall/trade/delivery/pickUpStore/index.ts | 12 ++- src/api/member/user/index.ts | 5 - src/api/pay/app/index.ts | 3 + src/api/pay/order/index.ts | 10 +- src/api/pay/wallet/balance/index.ts | 10 +- src/main.ts | 6 +- 25 files changed, 397 insertions(+), 67 deletions(-) delete mode 100644 src/api/bpm/activity/index.ts create mode 100644 src/api/bpm/simple/index.ts create mode 100644 src/api/mall/product/history.ts create mode 100644 src/api/mall/promotion/kefu/conversation/index.ts create mode 100644 src/api/mall/promotion/kefu/message/index.ts create mode 100644 src/api/mall/promotion/point/index.ts diff --git a/src/api/bpm/activity/index.ts b/src/api/bpm/activity/index.ts deleted file mode 100644 index 870d0d6c..00000000 --- a/src/api/bpm/activity/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import request from '@/config/axios' - -export const getActivityList = async (params) => { - return await request.get({ - url: '/bpm/activity/list', - params - }) -} diff --git a/src/api/bpm/category/index.ts b/src/api/bpm/category/index.ts index d1e109cb..1854f31c 100644 --- a/src/api/bpm/category/index.ts +++ b/src/api/bpm/category/index.ts @@ -36,6 +36,16 @@ export const CategoryApi = { return await request.put({ url: `/bpm/category/update`, data }) }, + // 批量修改流程分类的排序 + updateCategorySortBatch: async (ids: number[]) => { + return await request.put({ + url: `/bpm/category/update-sort-batch`, + params: { + ids: ids.join(',') + } + }) + }, + // 删除流程分类 deleteCategory: async (id: number) => { return await request.delete({ url: `/bpm/category/delete?id=` + id }) diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index cb6d4271..caedba14 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -1,6 +1,6 @@ import request from '@/config/axios' -export const getProcessDefinition = async (id: number, key: string) => { +export const getProcessDefinition = async (id?: string, key?: string) => { return await request.get({ url: '/bpm/process-definition/get', params: { id, key } diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index 2e1d4e64..0c499dba 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -5,6 +5,7 @@ export type ProcessDefinitionVO = { version: number deploymentTIme: string suspensionState: number + formType?: number } export type ModelVO = { @@ -25,11 +26,11 @@ export type ModelVO = { bpmnXml: string } -export const getModelPage = async (params) => { - return await request.get({ url: '/bpm/model/page', params }) +export const getModelList = async (name: string | undefined) => { + return await request.get({ url: '/bpm/model/list', params: { name } }) } -export const getModel = async (id: number) => { +export const getModel = async (id: string) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } @@ -37,6 +38,20 @@ export const updateModel = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } +// 批量修改流程分类的排序 +export const updateModelSortBatch = async (ids: number[]) => { + return await request.put({ + url: `/bpm/model/update-sort-batch`, + params: { + ids: ids.join(',') + } + }) +} + +export const updateModelBpmn = async (data: ModelVO) => { + return await request.put({ url: '/bpm/model/update-bpmn', data: data }) +} + // 任务状态修改 export const updateModelState = async (id: number, state: number) => { const data = { diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 81640625..f97270f9 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -1,5 +1,6 @@ import request from '@/config/axios' - +import { ProcessDefinitionVO } from '@/api/bpm/model' +import { NodeType, CandidateStrategy } from '@/components/SimpleProcessDesignerV2/src/consts' export type Task = { id: string name: string @@ -18,19 +19,38 @@ export type ProcessInstanceVO = { businessKey: string createTime: string endTime: string + processDefinition?: ProcessDefinitionVO } -export type ProcessInstanceCopyVO = { - type: number - taskName: string - taskKey: string - processInstanceName: string - processInstanceKey: string - startUserId: string - options: string[] +// 用户信息 +export type User = { + id: number + nickname: string + avatar: string +} + +// 审批任务信息 +export type ApprovalTaskInfo = { + id: number + ownerUser: User + assigneeUser: User + status: number reason: string } +// 审批节点信息 +export type ApprovalNodeInfo = { + id: number + name: string + nodeType: NodeType + candidateStrategy?: CandidateStrategy + status: number + startTime?: Date + endTime?: Date + candidateUsers?: User[] + tasks: ApprovalTaskInfo[] +} + export const getProcessInstanceMyPage = async (params: any) => { return await request.get({ url: '/bpm/process-instance/my-page', params }) } @@ -66,3 +86,18 @@ export const getProcessInstance = async (id: string) => { export const getProcessInstanceCopyPage = async (params: any) => { return await request.get({ url: '/bpm/process-instance/copy/page', params }) } + +// 获取审批详情 +export const getApprovalDetail = async (params: any) => { + return await request.get({ url: 'bpm/process-instance/get-approval-detail' , params }) +} + +// 获取表单字段权限 +export const getFormFieldsPermission = async (params: any) => { + return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params }) +} + +// 获取流程实例的 BPMN 模型视图 +export const getProcessInstanceBpmnModelView = async (id: string) => { + return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id }) +} diff --git a/src/api/bpm/simple/index.ts b/src/api/bpm/simple/index.ts new file mode 100644 index 00000000..6e1e995a --- /dev/null +++ b/src/api/bpm/simple/index.ts @@ -0,0 +1,15 @@ +import request from '@/config/axios' + + +export const updateBpmSimpleModel = async (data) => { + return await request.post({ + url: '/bpm/model/simple/update', + data: data + }) +} + +export const getBpmSimpleModel = async (id) => { + return await request.get({ + url: '/bpm/model/simple/get?id=' + id + }) +} diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index f3cda9f7..d4c10380 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -1,7 +1,44 @@ import request from '@/config/axios' -export type TaskVO = { - id: number +/** + * 任务状态枚举 + */ +export enum TaskStatusEnum { + /** + * 未开始 + */ + NOT_START = -1, + + /** + * 待审批 + */ + WAIT = 0, + /** + * 审批中 + */ + RUNNING = 1, + /** + * 审批通过 + */ + APPROVE = 2, + + /** + * 审批不通过 + */ + REJECT = 3, + + /** + * 已取消 + */ + CANCEL = 4, + /** + * 已退回 + */ + RETURN = 5, + /** + * 审批通过中 + */ + APPROVING = 7 } export const getTaskTodoPage = async (params: any) => { @@ -30,12 +67,12 @@ export const getTaskListByProcessInstanceId = async (processInstanceId: string) }) } -// 获取所有可回退的节点 +// 获取所有可退回的节点 export const getTaskListByReturn = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-return', params: { id } }) } -// 回退 +// 退回 export const returnTask = async (data: any) => { return await request.put({ url: '/bpm/task/return', data }) } @@ -60,6 +97,16 @@ export const signDeleteTask = async (data: any) => { return await request.delete({ url: '/bpm/task/delete-sign', data }) } +// 抄送 +export const copyTask = async (data: any) => { + return await request.put({ url: '/bpm/task/copy', data }) +} + +// 获取我的待办任务 +export const myTodoTask = async (processInstanceId: string) => { + return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId }) +} + // 获取减签任务列表 export const getChildrenTaskList = async (id: string) => { return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id }) diff --git a/src/api/infra/jobLog/index.ts b/src/api/infra/jobLog/index.ts index dc80f1d9..ed54761c 100644 --- a/src/api/infra/jobLog/index.ts +++ b/src/api/infra/jobLog/index.ts @@ -12,6 +12,7 @@ export interface JobLogVO { duration: string status: number createTime: string + result: string } // 任务日志列表 diff --git a/src/api/mall/product/history.ts b/src/api/mall/product/history.ts new file mode 100644 index 00000000..0aa45bd8 --- /dev/null +++ b/src/api/mall/product/history.ts @@ -0,0 +1,10 @@ +import request from '@/config/axios' + +/** + * 获得商品浏览记录分页 + * + * @param params 请求参数 + */ +export const getBrowseHistoryPage = (params: any) => { + return request.get({ url: '/product/browse-history/page', params }) +} diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts index 44dc663f..a191d82e 100644 --- a/src/api/mall/product/property.ts +++ b/src/api/mall/product/property.ts @@ -24,20 +24,6 @@ export interface PropertyValueVO { remark?: string } -/** - * 商品属性值的明细 - */ -export interface PropertyValueDetailVO { - /** 属性项的编号 */ - propertyId: number // 属性的编号 - /** 属性的名称 */ - propertyName: string - /** 属性值的编号 */ - valueId: number - /** 属性值的名称 */ - valueName: string -} - // ------------------------ 属性项 ------------------- // 创建属性项 @@ -65,6 +51,11 @@ export const getPropertyPage = (params: PageParam) => { return request.get({ url: '/product/property/page', params }) } +// 获得属性项精简列表 +export const getPropertySimpleList = (): Promise => { + return request.get({ url: '/product/property/simple-list' }) +} + // ------------------------ 属性值 ------------------- // 获得属性值分页 @@ -91,3 +82,8 @@ export const updatePropertyValue = (data: PropertyValueVO) => { export const deletePropertyValue = (id: number) => { return request.delete({ url: `/product/property/value/delete?id=${id}` }) } + +// 获得属性值精简列表 +export const getPropertyValueSimpleList = (propertyId: number): Promise => { + return request.get({ url: '/product/property/value/simple-list', params: { propertyId } }) +} diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index eee632d5..d44c0f64 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -50,6 +50,8 @@ export interface Spu { giveIntegral?: number // 赠送积分 virtualSalesCount?: number // 虚拟销量 price?: number // 商品价格 + combinationPrice?: number // 商品拼团价格 + seckillPrice?: number // 商品秒杀价格 salesCount?: number // 商品销量 marketPrice?: number // 市场价 costPrice?: number // 成本价 diff --git a/src/api/mall/promotion/combination/combinationActivity.ts b/src/api/mall/promotion/combination/combinationActivity.ts index 062db5c2..64002672 100644 --- a/src/api/mall/promotion/combination/combinationActivity.ts +++ b/src/api/mall/promotion/combination/combinationActivity.ts @@ -16,6 +16,7 @@ export interface CombinationActivityVO { virtualGroup?: number status?: number limitDuration?: number + combinationPrice?: number products: CombinationProductVO[] } @@ -36,7 +37,7 @@ export interface SpuExtension extends Spu { } // 查询拼团活动列表 -export const getCombinationActivityPage = async (params) => { +export const getCombinationActivityPage = async (params: any) => { return await request.get({ url: '/promotion/combination-activity/page', params }) } @@ -45,6 +46,11 @@ export const getCombinationActivity = async (id: number) => { return await request.get({ url: '/promotion/combination-activity/get?id=' + id }) } +// 获得拼团活动列表,基于活动编号数组 +export const getCombinationActivityListByIds = (ids: number[]) => { + return request.get({ url: `/promotion/combination-activity/list-by-ids?ids=${ids}` }) +} + // 新增拼团活动 export const createCombinationActivity = async (data: CombinationActivityVO) => { return await request.post({ url: '/promotion/combination-activity/create', data }) diff --git a/src/api/mall/promotion/coupon/couponTemplate.ts b/src/api/mall/promotion/coupon/couponTemplate.ts index 50ae226c..7e0a68c7 100755 --- a/src/api/mall/promotion/coupon/couponTemplate.ts +++ b/src/api/mall/promotion/coupon/couponTemplate.ts @@ -74,7 +74,7 @@ export function getCouponTemplatePage(params: PageParam) { } // 获得优惠劵模板分页 -export function getCouponTemplateList(ids: number[]) { +export function getCouponTemplateList(ids: number[]): Promise { return request.get({ url: `/promotion/coupon-template/list?ids=${ids}` }) diff --git a/src/api/mall/promotion/kefu/conversation/index.ts b/src/api/mall/promotion/kefu/conversation/index.ts new file mode 100644 index 00000000..eb6eb9c9 --- /dev/null +++ b/src/api/mall/promotion/kefu/conversation/index.ts @@ -0,0 +1,39 @@ +import request from '@/config/axios' + +export interface KeFuConversationRespVO { + id: number // 编号 + userId: number // 会话所属用户 + userAvatar: string // 会话所属用户头像 + userNickname: string // 会话所属用户昵称 + lastMessageTime: Date // 最后聊天时间 + lastMessageContent: string // 最后聊天内容 + lastMessageContentType: number // 最后发送的消息类型 + adminPinned: boolean // 管理端置顶 + userDeleted: boolean // 用户是否可见 + adminDeleted: boolean // 管理员是否可见 + adminUnreadMessageCount: number // 管理员未读消息数 + createTime?: string // 创建时间 +} + +// 客服会话 API +export const KeFuConversationApi = { + // 获得客服会话列表 + getConversationList: async () => { + return await request.get({ url: '/promotion/kefu-conversation/list' }) + }, + // 获得客服会话 + getConversation: async (id: number) => { + return await request.get({ url: `/promotion/kefu-conversation/get?id=` + id }) + }, + // 客服会话置顶 + updateConversationPinned: async (data: any) => { + return await request.put({ + url: '/promotion/kefu-conversation/update-conversation-pinned', + data + }) + }, + // 删除客服会话 + deleteConversation: async (id: number) => { + return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}` }) + } +} diff --git a/src/api/mall/promotion/kefu/message/index.ts b/src/api/mall/promotion/kefu/message/index.ts new file mode 100644 index 00000000..4c3bed88 --- /dev/null +++ b/src/api/mall/promotion/kefu/message/index.ts @@ -0,0 +1,36 @@ +import request from '@/config/axios' + +export interface KeFuMessageRespVO { + id: number // 编号 + conversationId: number // 会话编号 + senderId: number // 发送人编号 + senderAvatar: string // 发送人头像 + senderType: number // 发送人类型 + receiverId: number // 接收人编号 + receiverType: number // 接收人类型 + contentType: number // 消息类型 + content: string // 消息 + readStatus: boolean // 是否已读 + createTime: Date // 创建时间 +} + +// 客服会话 API +export const KeFuMessageApi = { + // 发送客服消息 + sendKeFuMessage: async (data: any) => { + return await request.post({ + url: '/promotion/kefu-message/send', + data + }) + }, + // 更新客服消息已读状态 + updateKeFuMessageReadStatus: async (conversationId: number) => { + return await request.put({ + url: '/promotion/kefu-message/update-read-status?conversationId=' + conversationId + }) + }, + // 获得消息列表(流式加载) + getKeFuMessageList: async (params: any) => { + return await request.get({ url: '/promotion/kefu-message/list', params }) + } +} diff --git a/src/api/mall/promotion/point/index.ts b/src/api/mall/promotion/point/index.ts new file mode 100644 index 00000000..38254c2d --- /dev/null +++ b/src/api/mall/promotion/point/index.ts @@ -0,0 +1,91 @@ +import request from '@/config/axios' +import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO + +// 积分商城活动 VO +export interface PointActivityVO { + id: number // 积分商城活动编号 + spuId: number // 积分商城活动商品 + status: number // 活动状态 + stock: number // 积分商城活动库存 + totalStock: number // 积分商城活动总库存 + remark?: string // 备注 + sort: number // 排序 + createTime: string // 创建时间 + products: PointProductVO[] // 积分商城商品 + + // ========== 商品字段 ========== + spuName: string // 商品名称 + picUrl: string // 商品主图 + marketPrice: number // 商品市场价,单位:分 + + //======================= 显示所需兑换积分最少的 sku 信息 ======================= + point: number // 兑换积分 + price: number // 兑换金额,单位:分 +} + +// 秒杀活动所需属性 +export interface PointProductVO { + id?: number // 积分商城商品编号 + activityId?: number // 积分商城活动 id + spuId?: number // 商品 SPU 编号 + skuId: number // 商品 SKU 编号 + count: number // 可兑换数量 + point: number // 兑换积分 + price: number // 兑换金额,单位:分 + stock: number // 积分商城商品库存 + activityStatus?: number // 积分商城商品状态 +} + +// 扩展 Sku 配置 +export type SkuExtension = Sku & { + productConfig: PointProductVO +} + +export interface SpuExtension extends Spu { + skus: SkuExtension[] // 重写类型 +} + +export interface SpuExtension0 extends Spu { + pointStock: number // 积分商城活动库存 + pointTotalStock: number // 积分商城活动总库存 + point: number // 兑换积分 + pointPrice: number // 兑换金额,单位:分 +} + +// 积分商城活动 API +export const PointActivityApi = { + // 查询积分商城活动分页 + getPointActivityPage: async (params: any) => { + return await request.get({ url: `/promotion/point-activity/page`, params }) + }, + + // 查询积分商城活动详情 + getPointActivity: async (id: number) => { + return await request.get({ url: `/promotion/point-activity/get?id=` + id }) + }, + + // 查询积分商城活动列表,基于活动编号数组 + getPointActivityListByIds: async (ids: number[]) => { + return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` }) + }, + + // 新增积分商城活动 + createPointActivity: async (data: PointActivityVO) => { + return await request.post({ url: `/promotion/point-activity/create`, data }) + }, + + // 修改积分商城活动 + updatePointActivity: async (data: PointActivityVO) => { + return await request.put({ url: `/promotion/point-activity/update`, data }) + }, + + // 删除积分商城活动 + deletePointActivity: async (id: number) => { + return await request.delete({ url: `/promotion/point-activity/delete?id=` + id }) + }, + + // 关闭秒杀活动 + closePointActivity: async (id: number) => { + return await request.put({ url: '/promotion/point-activity/close?id=' + id }) + } +} diff --git a/src/api/mall/promotion/reward/rewardActivity.ts b/src/api/mall/promotion/reward/rewardActivity.ts index 691db476..e9f95ed8 100644 --- a/src/api/mall/promotion/reward/rewardActivity.ts +++ b/src/api/mall/promotion/reward/rewardActivity.ts @@ -1,34 +1,39 @@ import request from '@/config/axios' -export interface DiscountActivityVO { +export interface RewardActivityVO { id?: number name?: string startTime?: Date endTime?: Date + startAndEndTime?: Date[] // 只前端使用 remark?: string conditionType?: number productScope?: number + rules: RewardRule[] + // 如下仅用于表单,不提交 + productScopeValues?: number[] // 商品范围:值为品类编号列表、商品编号列表 + productCategoryIds?: number[] productSpuIds?: number[] - rules?: DiscountProductVO[] } // 优惠规则 -export interface DiscountProductVO { - limit: number - discountPrice: number - freeDelivery: boolean +export interface RewardRule { + limit?: number + discountPrice?: number + freeDelivery?: boolean point: number - couponIds: number[] - couponCounts: number[] + giveCouponTemplateCounts?: { + [key: number]: number + } } // 新增满减送活动 -export const createRewardActivity = async (data: DiscountActivityVO) => { +export const createRewardActivity = async (data: RewardActivityVO) => { return await request.post({ url: '/promotion/reward-activity/create', data }) } // 更新满减送活动 -export const updateRewardActivity = async (data: DiscountActivityVO) => { +export const updateRewardActivity = async (data: RewardActivityVO) => { return await request.put({ url: '/promotion/reward-activity/update', data }) } @@ -42,7 +47,12 @@ export const getReward = async (id: number) => { return await request.get({ url: '/promotion/reward-activity/get?id=' + id }) } -// 删除限时折扣活动 +// 删除满减送活动 export const deleteRewardActivity = async (id: number) => { return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id }) } + +// 关闭满减送活动 +export const closeRewardActivity = async (id: number) => { + return await request.put({ url: '/promotion/reward-activity/close?id=' + id }) +} diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts index e8346410..dc5a350a 100644 --- a/src/api/mall/promotion/seckill/seckillActivity.ts +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -18,12 +18,14 @@ export interface SeckillActivityVO { singleLimitCount?: number stock?: number totalStock?: number + seckillPrice?: number products?: SeckillProductVO[] } // 秒杀活动所需属性 export interface SeckillProductVO { skuId: number + spuId: number seckillPrice: number stock: number } @@ -42,6 +44,11 @@ export const getSeckillActivityPage = async (params) => { return await request.get({ url: '/promotion/seckill-activity/page', params }) } +// 查询秒杀活动列表,基于活动编号数组 +export const getSeckillActivityListByIds = (ids: number[]) => { + return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` }) +} + // 查询秒杀活动详情 export const getSeckillActivity = async (id: number) => { return await request.get({ url: '/promotion/seckill-activity/get?id=' + id }) diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts index 66857df8..37d9b543 100644 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -19,7 +19,7 @@ export const SeckillConfigApi = { // 查询秒杀时段列表 getSimpleSeckillConfigList: async () => { - return await request.get({ url: `/promotion/seckill-config/simple-list` }) + return await request.get({ url: `/promotion/seckill-config/list` }) }, // 查询秒杀时段详情 diff --git a/src/api/mall/trade/delivery/pickUpStore/index.ts b/src/api/mall/trade/delivery/pickUpStore/index.ts index c3175021..ea6c852b 100644 --- a/src/api/mall/trade/delivery/pickUpStore/index.ts +++ b/src/api/mall/trade/delivery/pickUpStore/index.ts @@ -13,10 +13,11 @@ export interface DeliveryPickUpStoreVO { latitude: number longitude: number status: number + verifyUserIds: number[] // 绑定用户编号组数 } // 查询自提门店列表 -export const getDeliveryPickUpStorePage = async (params) => { +export const getDeliveryPickUpStorePage = async (params: any) => { return await request.get({ url: '/trade/delivery/pick-up-store/page', params }) } @@ -26,8 +27,8 @@ export const getDeliveryPickUpStore = async (id: number) => { } // 查询自提门店精简列表 -export const getListAllSimple = async (): Promise => { - return await request.get({ url: '/trade/delivery/pick-up-store/list-all-simple' }) +export const getSimpleDeliveryPickUpStoreList = async (): Promise => { + return await request.get({ url: '/trade/delivery/pick-up-store/simple-list' }) } // 新增自提门店 @@ -44,3 +45,8 @@ export const updateDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) => export const deleteDeliveryPickUpStore = async (id: number) => { return await request.delete({ url: '/trade/delivery/pick-up-store/delete?id=' + id }) } + +// 绑定自提店员 +export const bindStoreStaffId = async (data: any) => { + return await request.post({ url: '/trade/delivery/pick-up-store/bind', data }) +} diff --git a/src/api/member/user/index.ts b/src/api/member/user/index.ts index e38206a8..1f8acf49 100644 --- a/src/api/member/user/index.ts +++ b/src/api/member/user/index.ts @@ -46,8 +46,3 @@ export const updateUserLevel = async (data: any) => { export const updateUserPoint = async (data: any) => { return await request.put({ url: `/member/user/update-point`, data }) } - -// 修改会员用户余额 -export const updateUserBalance = async (data: any) => { - return await request.put({ url: `/member/user/update-balance`, data }) -} diff --git a/src/api/pay/app/index.ts b/src/api/pay/app/index.ts index 4bb06b36..d6fa83cf 100644 --- a/src/api/pay/app/index.ts +++ b/src/api/pay/app/index.ts @@ -2,11 +2,13 @@ import request from '@/config/axios' export interface AppVO { id: number + appKey: string name: string status: number remark: string payNotifyUrl: string refundNotifyUrl: string + transferNotifyUrl: string merchantId: number merchantName: string createTime: Date @@ -18,6 +20,7 @@ export interface AppPageReqVO extends PageParam { remark?: string payNotifyUrl?: string refundNotifyUrl?: string + transferNotifyUrl?: string merchantName?: string createTime?: Date[] } diff --git a/src/api/pay/order/index.ts b/src/api/pay/order/index.ts index 71960a8a..6460c4d1 100644 --- a/src/api/pay/order/index.ts +++ b/src/api/pay/order/index.ts @@ -84,8 +84,14 @@ export const getOrderPage = async (params: OrderPageReqVO) => { } // 查询详情支付订单 -export const getOrder = async (id: number) => { - return await request.get({ url: '/pay/order/get?id=' + id }) +export const getOrder = async (id: number, sync?: boolean) => { + return await request.get({ + url: '/pay/order/get', + params: { + id, + sync + } + }) } // 获得支付订单的明细 diff --git a/src/api/pay/wallet/balance/index.ts b/src/api/pay/wallet/balance/index.ts index 3e5ab369..d7c3edde 100644 --- a/src/api/pay/wallet/balance/index.ts +++ b/src/api/pay/wallet/balance/index.ts @@ -4,6 +4,7 @@ import request from '@/config/axios' export interface PayWalletUserReqVO { userId: number } + /** 钱包 VO */ export interface WalletVO { id: number @@ -20,7 +21,12 @@ export const getWallet = async (params: PayWalletUserReqVO) => { return await request.get({ url: `/pay/wallet/get`, params }) } -// 查询会员钱包列表 -export const getWalletPage = async (params) => { +/** 查询会员钱包列表 */ +export const getWalletPage = async (params: any) => { return await request.get({ url: `/pay/wallet/page`, params }) } + +/** 修改会员钱包余额 */ +export const updateWalletBalance = async (data: any) => { + return await request.put({ url: `/pay/wallet/update-balance`, data }) +} diff --git a/src/main.ts b/src/main.ts index 76c72473..874f7668 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,8 +28,8 @@ import '@/plugins/animate.css' // 路由 import router, { setupRouter } from '@/router' -// 权限 -import { setupAuth } from '@/directives' +// 指令 +import { setupAuth, setupMountedFocus } from '@/directives' import { createApp } from 'vue' @@ -58,7 +58,9 @@ const setupAll = async () => { setupRouter(app) + // directives 指令 setupAuth(app) + setupMountedFocus(app) await router.isReady()