From 1427b588ba74d52e0281ee2e7afa0e12b54ad419 Mon Sep 17 00:00:00 2001 From: DaxPay Date: Mon, 29 Apr 2024 18:06:03 +0800 Subject: [PATCH] =?UTF-8?q?ref=20=E7=9B=B8=E5=85=B3=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/order/pay/PayOrder.api.ts | 3 +-- .../record/close/PayCloseRecord.api.ts | 16 +++++++-------- .../record/close/PayCloseRecordInfo.vue | 20 ++++++++----------- .../record/close/PayCloseRecordList.vue | 20 +++++++++---------- .../record/repair/PayRepairRecord.api.ts | 8 +++----- .../record/repair/PayRepairRecordInfo.vue | 18 ++++------------- .../payment/record/sync/PaySyncRecord.api.ts | 17 ---------------- 7 files changed, 34 insertions(+), 68 deletions(-) diff --git a/src/views/payment/order/pay/PayOrder.api.ts b/src/views/payment/order/pay/PayOrder.api.ts index aed8038a..23c83a3b 100644 --- a/src/views/payment/order/pay/PayOrder.api.ts +++ b/src/views/payment/order/pay/PayOrder.api.ts @@ -1,7 +1,6 @@ import { defHttp } from '/@/utils/http/axios' import { PageResult, Result } from '/#/axios' import { BaseEntity } from '/#/web' -import { PaySyncResult } from '/@/views/payment/record/sync/PaySyncRecord.api' /** * 分页 @@ -37,7 +36,7 @@ export function getOrderByOrderNo(orderNo: string) { * 根据订单号同步支付状态 */ export function syncByOrderNo(orderNo: string) { - return defHttp.post>({ + return defHttp.post({ url: '/order/pay/syncByOrderNo', params: { orderNo }, }) diff --git a/src/views/payment/record/close/PayCloseRecord.api.ts b/src/views/payment/record/close/PayCloseRecord.api.ts index 1946be51..ec6a5eb1 100644 --- a/src/views/payment/record/close/PayCloseRecord.api.ts +++ b/src/views/payment/record/close/PayCloseRecord.api.ts @@ -26,18 +26,18 @@ export function get(paymentId) { * 支付回调记录 */ export interface PayCloseRecord extends BaseEntity { - // 支付ID - paymentId?: string - // 业务号 - businessNo?: string - // 关闭的异步支付通道 - asyncChannel?: string + // 订单号 + orderNo?: string + // 商户订单号 + bizOrderNo?: string + // 关闭的支付通道 + channel?: string // 是否关闭成功 closed?: boolean + // 错误编码 + errorCode?: string // 错误消息 errorMsg?: string // 客户端IP clientIp?: string - // 请求链路ID - reqId?: string } diff --git a/src/views/payment/record/close/PayCloseRecordInfo.vue b/src/views/payment/record/close/PayCloseRecordInfo.vue index 4900c6d4..028bc24b 100644 --- a/src/views/payment/record/close/PayCloseRecordInfo.vue +++ b/src/views/payment/record/close/PayCloseRecordInfo.vue @@ -10,18 +10,21 @@ > - - {{ form.paymentId }} + + {{ form.orderNo }} - {{ form.businessNo }} + {{ form.bizOrderNo }} - - {{ dictConvert('PayChannel', form.asyncChannel) }} + + {{ dictConvert('PayChannel', form.channel) }} {{ form.closed ? '是' : '否' }} + + {{ form.errorMsg }} + {{ form.errorMsg }} @@ -47,18 +50,11 @@ import { BasicModal } from '/@/components/Modal' import { useDict } from '/@/hooks/bootx/useDict' const { - initFormEditType, handleCancel, - search, - labelCol, - wrapperCol, modalWidth, - title, confirmLoading, visible, - editable, showable, - formEditType, } = useFormEdit() const { dictConvert } = useDict() diff --git a/src/views/payment/record/close/PayCloseRecordList.vue b/src/views/payment/record/close/PayCloseRecordList.vue index 7176846e..7c574805 100644 --- a/src/views/payment/record/close/PayCloseRecordList.vue +++ b/src/views/payment/record/close/PayCloseRecordList.vue @@ -14,23 +14,23 @@ @sort-change="sortChange" > - + - + - + @@ -73,7 +73,8 @@ import PayOrderInfo from '/@/views/payment/order/pay/PayOrderInfo.vue' // 使用hooks - const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, sortChange, sortParam, pages, model, loading } = useTablePage(queryPage) + const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, sortChange, sortParam, pages, model, loading } = + useTablePage(queryPage) const { notification, createMessage, createConfirm } = useMessage() const { dictConvert, dictDropDown } = useDict() @@ -133,7 +134,7 @@ page({ ...model.queryParam, ...pages, - ...sortParam + ...sortParam, }).then(({ data }) => { pageQueryResHandel(data) }) @@ -148,10 +149,9 @@ /** * 查看支付单信息 - * @param paymentId */ - function showPayment(paymentId) { - payOrderInfo.init(paymentId) + function showPayOder(orderNo) { + payOrderInfo.init(orderNo) } diff --git a/src/views/payment/record/repair/PayRepairRecord.api.ts b/src/views/payment/record/repair/PayRepairRecord.api.ts index 54485b47..860180f6 100644 --- a/src/views/payment/record/repair/PayRepairRecord.api.ts +++ b/src/views/payment/record/repair/PayRepairRecord.api.ts @@ -29,9 +29,9 @@ export interface PayRepairRecord extends BaseEntity { // 修复号 repairNo?: string // 本地订单ID - orderId?: string + tradeId?: string // 本地业务号 - orderNo?: string + tradeNo?: string // 类型 支付修复/退款修复 repairType?: string // 修复来源 @@ -39,11 +39,9 @@ export interface PayRepairRecord extends BaseEntity { // 修复类型 repairWay?: string // 修复的异步支付通道 - asyncChannel?: string + channel?: string // 修复前状态 beforeStatus?: string // 修复后状态 afterStatus?: string - // 金额变动 - amount?: string } diff --git a/src/views/payment/record/repair/PayRepairRecordInfo.vue b/src/views/payment/record/repair/PayRepairRecordInfo.vue index b2c20211..75fdf97a 100644 --- a/src/views/payment/record/repair/PayRepairRecordInfo.vue +++ b/src/views/payment/record/repair/PayRepairRecordInfo.vue @@ -10,23 +10,20 @@ > - - {{ form.id }} - {{ form.repairNo }} - {{ form.orderId }} + {{ form.tradeId }} - {{ form.orderNo }} + {{ form.tradeNo }} {{ dictConvert('PaymentType', form.repairType) }} - - {{ dictConvert('AsyncPayChannel', form.asyncChannel) }} + + {{ dictConvert('PayChannel', form.channel) }} {{ dictConvert('PayRepairSource', form.repairSource) }} @@ -62,18 +59,11 @@ import { BasicModal } from '/@/components/Modal' import { useDict } from '/@/hooks/bootx/useDict' const { - initFormEditType, handleCancel, - search, - labelCol, - wrapperCol, modalWidth, - title, confirmLoading, visible, - editable, showable, - formEditType, } = useFormEdit() const { dictConvert } = useDict() diff --git a/src/views/payment/record/sync/PaySyncRecord.api.ts b/src/views/payment/record/sync/PaySyncRecord.api.ts index eb538727..5654817e 100644 --- a/src/views/payment/record/sync/PaySyncRecord.api.ts +++ b/src/views/payment/record/sync/PaySyncRecord.api.ts @@ -53,20 +53,3 @@ export interface SyncRecord extends BaseEntity { // 请求链路ID reqId?: string } -/** - * 支付同步结果 - */ -export interface PaySyncResult { - // 支付网关同步状态 - gatewayStatus?: string - // 是否同步成功 - success?: boolean - // 是否进行了修复 - repair?: boolean - // 支付单同步前状态 - beforeStatus?: string - // 支付单同步后状态 - afterStatus?: string - // 支付单同步后状态 - errorMsg?: string -}