Skip to content

Commit

Permalink
refactor: pay
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyuv committed Nov 30, 2022
1 parent 24439b7 commit cbc7b9d
Show file tree
Hide file tree
Showing 19 changed files with 1,025 additions and 1,008 deletions.
48 changes: 40 additions & 8 deletions yudao-ui-admin-vue3/src/api/pay/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
import request from '@/config/axios'
import type { AppVO } from './types'

export interface AppVO {
id: number
name: string
status: number
remark: string
payNotifyUrl: string
refundNotifyUrl: string
merchantId: number
merchantName: string
createTime: Date
}

export interface AppPageReqVO extends PageParam {
name?: string
status?: number
remark?: string
payNotifyUrl?: string
refundNotifyUrl?: string
merchantName?: string
createTime?: Date[]
}

export interface AppExportReqVO {
name?: string
status?: number
remark?: string
payNotifyUrl?: string
refundNotifyUrl?: string
merchantName?: string
createTime?: Date[]
}

export interface AppUpdateStatusReqVO {
id: number
status: number
}

// 查询列表支付应用
export const getAppPageApi = (params) => {
export const getAppPageApi = (params: AppPageReqVO) => {
return request.get({ url: '/pay/app/page', params })
}

Expand All @@ -22,11 +58,7 @@ export const updateAppApi = (data: AppVO) => {
}

// 支付应用信息状态修改
export const changeAppStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => {
return request.put({ url: '/pay/app/update-status', data: data })
}

Expand All @@ -36,7 +68,7 @@ export const deleteAppApi = (id: number) => {
}

// 导出支付应用
export const exportAppApi = (params) => {
export const exportAppApi = (params: AppExportReqVO) => {
return request.download({ url: '/pay/app/export-excel', params })
}

Expand Down
11 changes: 0 additions & 11 deletions yudao-ui-admin-vue3/src/api/pay/app/types.ts

This file was deleted.

39 changes: 36 additions & 3 deletions yudao-ui-admin-vue3/src/api/pay/channel/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
import request from '@/config/axios'
import type { ChannelVO } from './types'

export interface ChannelVO {
id: number
code: string
config: string
status: number
remark: string
feeRate: number
merchantId: number
appId: number
createTime: Date
}

export interface ChannelPageReqVO extends PageParam {
code?: string
status?: number
remark?: string
feeRate?: number
merchantId?: number
appId?: number
config?: string
createTime?: Date[]
}

export interface ChannelExportReqVO {
code?: string
status?: number
remark?: string
feeRate?: number
merchantId?: number
appId?: number
config?: string
createTime?: Date[]
}

// 查询列表支付渠道
export const getChannelPageApi = (params) => {
export const getChannelPageApi = (params: ChannelPageReqVO) => {
return request.get({ url: '/pay/channel/page', params })
}

Expand Down Expand Up @@ -32,6 +65,6 @@ export const deleteChannelApi = (id: number) => {
}

// 导出支付渠道
export const exportChannelApi = (params) => {
export const exportChannelApi = (params: ChannelExportReqVO) => {
return request.download({ url: '/pay/channel/export-excel', params })
}
11 changes: 0 additions & 11 deletions yudao-ui-admin-vue3/src/api/pay/channel/types.ts

This file was deleted.

33 changes: 30 additions & 3 deletions yudao-ui-admin-vue3/src/api/pay/merchant/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
import request from '@/config/axios'
import type { MerchantVO } from './types'

export interface MerchantVO {
id: number
no: string
name: string
shortName: string
status: number
remark: string
createTime: Date
}

export interface MerchantPageReqVO extends PageParam {
no?: string
name?: string
shortName?: string
status?: number
remark?: string
createTime?: Date[]
}

export interface MerchantExportReqVO {
no?: string
name?: string
shortName?: string
status?: number
remark?: string
createTime?: Date[]
}

// 查询列表支付商户
export const getMerchantPageApi = (params) => {
export const getMerchantPageApi = (params: MerchantPageReqVO) => {
return request.get({ url: '/pay/merchant/page', params })
}

Expand Down Expand Up @@ -37,7 +64,7 @@ export const deleteMerchantApi = (id: number) => {
}

// 导出支付商户
export const exportMerchantApi = (params) => {
export const exportMerchantApi = (params: MerchantExportReqVO) => {
return request.download({ url: '/pay/merchant/export-excel', params })
}
// 支付商户状态修改
Expand Down
9 changes: 0 additions & 9 deletions yudao-ui-admin-vue3/src/api/pay/merchant/types.ts

This file was deleted.

83 changes: 80 additions & 3 deletions yudao-ui-admin-vue3/src/api/pay/order/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,85 @@
import request from '@/config/axios'
import type { OrderVO } from './types'

export interface OrderVO {
id: number
merchantId: number
appId: number
channelId: number
channelCode: string
merchantOrderId: string
subject: string
body: string
notifyUrl: string
notifyStatus: number
amount: number
channelFeeRate: number
channelFeeAmount: number
status: number
userIp: string
expireTime: Date
successTime: Date
notifyTime: Date
successExtensionId: number
refundStatus: number
refundTimes: number
refundAmount: number
channelUserId: string
channelOrderNo: string
createTime: Date
}

export interface OrderPageReqVO extends PageParam {
merchantId?: number
appId?: number
channelId?: number
channelCode?: string
merchantOrderId?: string
subject?: string
body?: string
notifyUrl?: string
notifyStatus?: number
amount?: number
channelFeeRate?: number
channelFeeAmount?: number
status?: number
expireTime?: Date[]
successTime?: Date[]
notifyTime?: Date[]
successExtensionId?: number
refundStatus?: number
refundTimes?: number
channelUserId?: string
channelOrderNo?: string
createTime?: Date[]
}

export interface OrderExportReqVO {
merchantId?: number
appId?: number
channelId?: number
channelCode?: string
merchantOrderId?: string
subject?: string
body?: string
notifyUrl?: string
notifyStatus?: number
amount?: number
channelFeeRate?: number
channelFeeAmount?: number
status?: number
expireTime?: Date[]
successTime?: Date[]
notifyTime?: Date[]
successExtensionId?: number
refundStatus?: number
refundTimes?: number
channelUserId?: string
channelOrderNo?: string
createTime?: Date[]
}

// 查询列表支付订单
export const getOrderPageApi = async (params) => {
export const getOrderPageApi = async (params: OrderPageReqVO) => {
return await request.get({ url: '/pay/order/page', params })
}

Expand All @@ -27,6 +104,6 @@ export const deleteOrderApi = async (id: number) => {
}

// 导出支付订单
export const exportOrderApi = async (params) => {
export const exportOrderApi = async (params: OrderExportReqVO) => {
return await request.download({ url: '/pay/order/export-excel', params })
}
26 changes: 0 additions & 26 deletions yudao-ui-admin-vue3/src/api/pay/order/types.ts

This file was deleted.

Loading

0 comments on commit cbc7b9d

Please sign in to comment.