first commit
This commit is contained in:
68
src/api/pay/app/index.ts
Normal file
68
src/api/pay/app/index.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
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
|
||||
}
|
||||
|
||||
export interface AppPageReqVO extends PageParam {
|
||||
name?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
payNotifyUrl?: string
|
||||
refundNotifyUrl?: string
|
||||
transferNotifyUrl?: string
|
||||
merchantName?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
export interface AppUpdateStatusReqVO {
|
||||
id: number
|
||||
status: number
|
||||
}
|
||||
|
||||
// 查询列表支付应用
|
||||
export const getAppPage = (params: AppPageReqVO) => {
|
||||
return request.get({ url: '/pay/app/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付应用
|
||||
export const getApp = (id: number) => {
|
||||
return request.get({ url: '/pay/app/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增支付应用
|
||||
export const createApp = (data: AppVO) => {
|
||||
return request.post({ url: '/pay/app/create', data })
|
||||
}
|
||||
|
||||
// 修改支付应用
|
||||
export const updateApp = (data: AppVO) => {
|
||||
return request.put({ url: '/pay/app/update', data })
|
||||
}
|
||||
|
||||
// 支付应用信息状态修改
|
||||
export const changeAppStatus = (data: AppUpdateStatusReqVO) => {
|
||||
return request.put({ url: '/pay/app/update-status', data: data })
|
||||
}
|
||||
|
||||
// 删除支付应用
|
||||
export const deleteApp = (id: number) => {
|
||||
return request.delete({ url: '/pay/app/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获得支付应用列表
|
||||
export const getAppList = () => {
|
||||
return request.get({
|
||||
url: '/pay/app/list'
|
||||
})
|
||||
}
|
||||
46
src/api/pay/channel/index.ts
Normal file
46
src/api/pay/channel/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ChannelVO {
|
||||
id: number
|
||||
code: string
|
||||
config: string
|
||||
status: number
|
||||
remark: string
|
||||
feeRate: number
|
||||
appId: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 查询列表支付渠道
|
||||
export const getChannelPage = (params: PageParam) => {
|
||||
return request.get({ url: '/pay/channel/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付渠道
|
||||
export const getChannel = (appId: string, code: string) => {
|
||||
const params = {
|
||||
appId: appId,
|
||||
code: code
|
||||
}
|
||||
return request.get({ url: '/pay/channel/get', params: params })
|
||||
}
|
||||
|
||||
// 新增支付渠道
|
||||
export const createChannel = (data: ChannelVO) => {
|
||||
return request.post({ url: '/pay/channel/create', data })
|
||||
}
|
||||
|
||||
// 修改支付渠道
|
||||
export const updateChannel = (data: ChannelVO) => {
|
||||
return request.put({ url: '/pay/channel/update', data })
|
||||
}
|
||||
|
||||
// 删除支付渠道
|
||||
export const deleteChannel = (id: number) => {
|
||||
return request.delete({ url: '/pay/channel/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出支付渠道
|
||||
export const exportChannel = (params) => {
|
||||
return request.download({ url: '/pay/channel/export-excel', params })
|
||||
}
|
||||
29
src/api/pay/demo/order/index.ts
Normal file
29
src/api/pay/demo/order/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DemoOrderVO {
|
||||
spuId: number
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
// 创建示例订单
|
||||
export function createDemoOrder(data: DemoOrderVO) {
|
||||
return request.post({
|
||||
url: '/pay/demo-order/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得示例订单分页
|
||||
export function getDemoOrderPage(query: PageParam) {
|
||||
return request.get({
|
||||
url: '/pay/demo-order/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 退款示例订单
|
||||
export function refundDemoOrder(id: number) {
|
||||
return request.put({
|
||||
url: '/pay/demo-order/refund?id=' + id
|
||||
})
|
||||
}
|
||||
30
src/api/pay/demo/withdraw/index.ts
Normal file
30
src/api/pay/demo/withdraw/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PayDemoWithdrawVO {
|
||||
id?: number
|
||||
subject: string
|
||||
price: number
|
||||
userName: string
|
||||
userAccount: string
|
||||
type: number
|
||||
status?: number
|
||||
payTransferId?: number
|
||||
transferChannelCode?: string
|
||||
transferTime?: Date
|
||||
transferErrorMsg?: string
|
||||
}
|
||||
|
||||
// 查询示例提现单列表
|
||||
export const getDemoWithdrawPage = (params: PageParam) => {
|
||||
return request.get({ url: '/pay/demo-withdraw/page', params })
|
||||
}
|
||||
|
||||
// 创建示例提现单
|
||||
export const createDemoWithdraw = (data: PayDemoWithdrawVO) => {
|
||||
return request.post({ url: '/pay/demo-withdraw/create', data })
|
||||
}
|
||||
|
||||
// 发起提现单转账
|
||||
export const transferDemoWithdraw = (id: number) => {
|
||||
return request.post({ url: '/pay/demo-withdraw/transfer', params: { id } })
|
||||
}
|
||||
16
src/api/pay/notify/index.ts
Normal file
16
src/api/pay/notify/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 获得支付通知明细
|
||||
export const getNotifyTaskDetail = (id) => {
|
||||
return request.get({
|
||||
url: '/pay/notify/get-detail?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得支付通知分页
|
||||
export const getNotifyTaskPage = (query) => {
|
||||
return request.get({
|
||||
url: '/pay/notify/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
110
src/api/pay/order/index.ts
Normal file
110
src/api/pay/order/index.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
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 getOrderPage = async (params: OrderPageReqVO) => {
|
||||
return await request.get({ url: '/pay/order/page', params })
|
||||
}
|
||||
|
||||
// 查询详情支付订单
|
||||
export const getOrder = async (id: number, sync?: boolean) => {
|
||||
return await request.get({
|
||||
url: '/pay/order/get',
|
||||
params: {
|
||||
id,
|
||||
sync
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获得支付订单的明细
|
||||
export const getOrderDetail = async (id: number) => {
|
||||
return await request.get({ url: '/pay/order/get-detail?id=' + id })
|
||||
}
|
||||
|
||||
// 提交支付订单
|
||||
export const submitOrder = async (data: any) => {
|
||||
return await request.post({ url: '/pay/order/submit', data })
|
||||
}
|
||||
|
||||
// 导出支付订单
|
||||
export const exportOrder = async (params: OrderExportReqVO) => {
|
||||
return await request.download({ url: '/pay/order/export-excel', params })
|
||||
}
|
||||
116
src/api/pay/refund/index.ts
Normal file
116
src/api/pay/refund/index.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface RefundVO {
|
||||
id: number
|
||||
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 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 interface PayRefundExportReqVO {
|
||||
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 const getRefundPage = (params: RefundPageReqVO) => {
|
||||
return request.get({ url: '/pay/refund/page', params })
|
||||
}
|
||||
|
||||
// 查询详情退款订单
|
||||
export const getRefund = (id: number) => {
|
||||
return request.get({ url: '/pay/refund/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增退款订单
|
||||
export const createRefund = (data: RefundVO) => {
|
||||
return request.post({ url: '/pay/refund/create', data })
|
||||
}
|
||||
|
||||
// 修改退款订单
|
||||
export const updateRefund = (data: RefundVO) => {
|
||||
return request.put({ url: '/pay/refund/update', data })
|
||||
}
|
||||
|
||||
// 删除退款订单
|
||||
export const deleteRefund = (id: number) => {
|
||||
return request.delete({ url: '/pay/refund/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出退款订单
|
||||
export const exportRefund = (params: PayRefundExportReqVO) => {
|
||||
return request.download({ url: '/pay/refund/export-excel', params })
|
||||
}
|
||||
16
src/api/pay/transfer/index.ts
Normal file
16
src/api/pay/transfer/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询转账单列表
|
||||
export const getTransferPage = async (params: PageParam) => {
|
||||
return await request.get({ url: `/pay/transfer/page`, params })
|
||||
}
|
||||
|
||||
// 查询转账单详情
|
||||
export const getTransfer = async (id: number) => {
|
||||
return await request.get({ url: '/pay/transfer/get?id=' + id })
|
||||
}
|
||||
|
||||
// 导出转账单
|
||||
export const exportTransfer = async (params: PageParam) => {
|
||||
return await request.download({ url: '/pay/transfer/export-excel', params })
|
||||
}
|
||||
32
src/api/pay/wallet/balance/index.ts
Normal file
32
src/api/pay/wallet/balance/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** 用户钱包查询参数 */
|
||||
export interface PayWalletUserReqVO {
|
||||
userId: number
|
||||
}
|
||||
|
||||
/** 钱包 VO */
|
||||
export interface WalletVO {
|
||||
id: number
|
||||
userId: number
|
||||
userType: number
|
||||
balance: number
|
||||
totalExpense: number
|
||||
totalRecharge: number
|
||||
freezePrice: number
|
||||
}
|
||||
|
||||
/** 查询用户钱包详情 */
|
||||
export const getWallet = async (params: PayWalletUserReqVO) => {
|
||||
return await request.get<WalletVO>({ url: `/pay/wallet/get`, 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 })
|
||||
}
|
||||
34
src/api/pay/wallet/rechargePackage/index.ts
Normal file
34
src/api/pay/wallet/rechargePackage/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface WalletRechargePackageVO {
|
||||
id: number
|
||||
name: string
|
||||
payPrice: number
|
||||
bonusPrice: number
|
||||
status: number
|
||||
}
|
||||
|
||||
// 查询套餐充值列表
|
||||
export const getWalletRechargePackagePage = async (params) => {
|
||||
return await request.get({ url: '/pay/wallet-recharge-package/page', params })
|
||||
}
|
||||
|
||||
// 查询套餐充值详情
|
||||
export const getWalletRechargePackage = async (id: number) => {
|
||||
return await request.get({ url: '/pay/wallet-recharge-package/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增套餐充值
|
||||
export const createWalletRechargePackage = async (data: WalletRechargePackageVO) => {
|
||||
return await request.post({ url: '/pay/wallet-recharge-package/create', data })
|
||||
}
|
||||
|
||||
// 修改套餐充值
|
||||
export const updateWalletRechargePackage = async (data: WalletRechargePackageVO) => {
|
||||
return await request.put({ url: '/pay/wallet-recharge-package/update', data })
|
||||
}
|
||||
|
||||
// 删除套餐充值
|
||||
export const deleteWalletRechargePackage = async (id: number) => {
|
||||
return await request.delete({ url: '/pay/wallet-recharge-package/delete?id=' + id })
|
||||
}
|
||||
14
src/api/pay/wallet/transaction/index.ts
Normal file
14
src/api/pay/wallet/transaction/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface WalletTransactionVO {
|
||||
id: number
|
||||
walletId: number
|
||||
title: string
|
||||
price: number
|
||||
balance: number
|
||||
}
|
||||
|
||||
// 查询会员钱包流水列表
|
||||
export const getWalletTransactionPage = async (params) => {
|
||||
return await request.get({ url: `/pay/wallet-transaction/page`, params })
|
||||
}
|
||||
Reference in New Issue
Block a user