fix: 对接提现申请与用户钱包,支付流水页面,对接角色权限页面

This commit is contained in:
ZhuRui
2026-08-04 18:26:47 +08:00
parent bf3f380ba8
commit 7cc56af0d5
14 changed files with 180 additions and 123 deletions
+18 -3
View File
@@ -2,7 +2,7 @@
* 支付流水假数据
* 对应接口:GET /admin/finance/paymentFlow/page
*/
import type { PaymentFlowVO, PaymentFlowQueryParams, PageData } from '@/api/payments';
import type { PaymentFlowVO, PaymentFlowQueryParams, PaymentFlowPageData } from '@/api/payments';
const MOCK_LIST: PaymentFlowVO[] = [
{
@@ -127,7 +127,7 @@ export function buildMockPaymentFlowPage(
page: number,
limit: number,
params: PaymentFlowQueryParams,
): PageData<PaymentFlowVO> {
): PaymentFlowPageData {
let filtered = [...MOCK_LIST];
if (params.nickname) {
@@ -143,7 +143,22 @@ export function buildMockPaymentFlowPage(
inDateRange(item.createDate, params.createDateBegin, params.createDateEnd),
);
let totalAmount = 0;
let totalRefundAmount = 0;
for (const item of filtered) {
const amt = Number(item.amount) || 0;
if (item.type === 1) totalAmount += amt;
else if (item.type === 2) totalRefundAmount += amt;
}
const total = filtered.length;
const start = (page - 1) * limit;
return { total, list: filtered.slice(start, start + limit) };
return {
total,
list: filtered.slice(start, start + limit),
exData: {
totalAmount: totalAmount.toFixed(2),
totalRefundAmount: totalRefundAmount.toFixed(2),
},
};
}