From ead1aac60cdef266c11752fcb96a6d58b2cb4304 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 6 Jan 2026 21:16:49 -0800 Subject: [PATCH] fix(admin-web): add operatorId to system-withdrawal request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wallet-service API requires operatorId parameter but frontend was not sending it, causing 400 error. Now includes operatorId and operatorName from current logged-in user. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../admin-web/src/app/(dashboard)/system-transfer/page.tsx | 6 ++++++ frontend/admin-web/src/types/system-withdrawal.types.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/frontend/admin-web/src/app/(dashboard)/system-transfer/page.tsx b/frontend/admin-web/src/app/(dashboard)/system-transfer/page.tsx index 31aebbba..fb5cdd11 100644 --- a/frontend/admin-web/src/app/(dashboard)/system-transfer/page.tsx +++ b/frontend/admin-web/src/app/(dashboard)/system-transfer/page.tsx @@ -5,6 +5,7 @@ import { Modal, toast, Button } from '@/components/common'; import { PageContainer } from '@/components/layout'; import { cn } from '@/utils/helpers'; import { formatDateTime } from '@/utils/formatters'; +import { useAppSelector } from '@/store/redux/hooks'; import { useSystemWithdrawalAccounts, useSystemWithdrawalOrders, @@ -24,6 +25,9 @@ type TabType = 'transfer' | 'orders'; * 系统账户划转管理页面 */ export default function SystemTransferPage() { + // 获取当前登录用户 + const currentUser = useAppSelector((state) => state.auth.user); + // 当前标签页 const [activeTab, setActiveTab] = useState('transfer'); @@ -101,6 +105,8 @@ export default function SystemTransferPage() { toAccountSequence: transferForm.toAccountSequence, amount: transferForm.amount, memo: transferForm.memo || undefined, + operatorId: currentUser?.id || 'admin', + operatorName: currentUser?.nickname || currentUser?.username, }); toast.success('划转请求已提交,等待区块链确认'); setConfirmModalOpen(false); diff --git a/frontend/admin-web/src/types/system-withdrawal.types.ts b/frontend/admin-web/src/types/system-withdrawal.types.ts index dd8f9257..736d80fc 100644 --- a/frontend/admin-web/src/types/system-withdrawal.types.ts +++ b/frontend/admin-web/src/types/system-withdrawal.types.ts @@ -43,6 +43,8 @@ export interface SystemWithdrawalRequest { toAccountSequence: string; amount: string; memo?: string; + operatorId: string; + operatorName?: string; } // 划转响应