初始化项目,自 v1.7.1 版本开始

This commit is contained in:
YunaiV
2023-02-11 00:44:00 +08:00
parent 11161afc1a
commit 56f3017baa
548 changed files with 52096 additions and 61 deletions

78
src/api/pay/app/index.ts Normal file
View File

@ -0,0 +1,78 @@
import request from '@/config/axios'
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: AppPageReqVO) => {
return request.get({ url: '/pay/app/page', params })
}
// 查询详情支付应用
export const getAppApi = (id: number) => {
return request.get({ url: '/pay/app/get?id=' + id })
}
// 新增支付应用
export const createAppApi = (data: AppVO) => {
return request.post({ url: '/pay/app/create', data })
}
// 修改支付应用
export const updateAppApi = (data: AppVO) => {
return request.put({ url: '/pay/app/update', data })
}
// 支付应用信息状态修改
export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => {
return request.put({ url: '/pay/app/update-status', data: data })
}
// 删除支付应用
export const deleteAppApi = (id: number) => {
return request.delete({ url: '/pay/app/delete?id=' + id })
}
// 导出支付应用
export const exportAppApi = (params: AppExportReqVO) => {
return request.download({ url: '/pay/app/export-excel', params })
}
// 根据商ID称搜索应用列表
export const getAppListByMerchantIdApi = (merchantId: number) => {
return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
}

View File

@ -0,0 +1,70 @@
import request from '@/config/axios'
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: ChannelPageReqVO) => {
return request.get({ url: '/pay/channel/page', params })
}
// 查询详情支付渠道
export const getChannelApi = (merchantId: number, appId: string, code: string) => {
const params = {
merchantId: merchantId,
appId: appId,
code: code
}
return request.get({ url: '/pay/channel/get-channel', params: params })
}
// 新增支付渠道
export const createChannelApi = (data: ChannelVO) => {
return request.post({ url: '/pay/channel/create', data })
}
// 修改支付渠道
export const updateChannelApi = (data: ChannelVO) => {
return request.put({ url: '/pay/channel/update', data })
}
// 删除支付渠道
export const deleteChannelApi = (id: number) => {
return request.delete({ url: '/pay/channel/delete?id=' + id })
}
// 导出支付渠道
export const exportChannelApi = (params: ChannelExportReqVO) => {
return request.download({ url: '/pay/channel/export-excel', params })
}

View File

@ -0,0 +1,77 @@
import request from '@/config/axios'
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: MerchantPageReqVO) => {
return request.get({ url: '/pay/merchant/page', params })
}
// 查询详情支付商户
export const getMerchantApi = (id: number) => {
return request.get({ url: '/pay/merchant/get?id=' + id })
}
// 根据商户名称搜索商户列表
export const getMerchantListByNameApi = (name: string) => {
return request.get({
url: '/pay/merchant/list-by-name?id=',
params: {
name: name
}
})
}
// 新增支付商户
export const createMerchantApi = (data: MerchantVO) => {
return request.post({ url: '/pay/merchant/create', data })
}
// 修改支付商户
export const updateMerchantApi = (data: MerchantVO) => {
return request.put({ url: '/pay/merchant/update', data })
}
// 删除支付商户
export const deleteMerchantApi = (id: number) => {
return request.delete({ url: '/pay/merchant/delete?id=' + id })
}
// 导出支付商户
export const exportMerchantApi = (params: MerchantExportReqVO) => {
return request.download({ url: '/pay/merchant/export-excel', params })
}
// 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return request.put({ url: '/pay/merchant/update-status', data: data })
}

109
src/api/pay/order/index.ts Normal file
View File

@ -0,0 +1,109 @@
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 getOrderPageApi = async (params: OrderPageReqVO) => {
return await request.get({ url: '/pay/order/page', params })
}
// 查询详情支付订单
export const getOrderApi = async (id: number) => {
return await request.get({ url: '/pay/order/get?id=' + id })
}
// 新增支付订单
export const createOrderApi = async (data: OrderVO) => {
return await request.post({ url: '/pay/order/create', data })
}
// 修改支付订单
export const updateOrderApi = async (data: OrderVO) => {
return await request.put({ url: '/pay/order/update', data })
}
// 删除支付订单
export const deleteOrderApi = async (id: number) => {
return await request.delete({ url: '/pay/order/delete?id=' + id })
}
// 导出支付订单
export const exportOrderApi = async (params: OrderExportReqVO) => {
return await request.download({ url: '/pay/order/export-excel', params })
}

116
src/api/pay/refund/index.ts Normal file
View 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 getRefundPageApi = (params: RefundPageReqVO) => {
return request.get({ url: '/pay/refund/page', params })
}
// 查询详情退款订单
export const getRefundApi = (id: number) => {
return request.get({ url: '/pay/refund/get?id=' + id })
}
// 新增退款订单
export const createRefundApi = (data: RefundVO) => {
return request.post({ url: '/pay/refund/create', data })
}
// 修改退款订单
export const updateRefundApi = (data: RefundVO) => {
return request.put({ url: '/pay/refund/update', data })
}
// 删除退款订单
export const deleteRefundApi = (id: number) => {
return request.delete({ url: '/pay/refund/delete?id=' + id })
}
// 导出退款订单
export const exportRefundApi = (params: PayRefundExportReqVO) => {
return request.download({ url: '/pay/refund/export-excel', params })
}