From ece1ef09ada5e5be6219e78b5a2cc7ee35461dbe Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Wed, 24 Dec 2025 20:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/controllers/withdrawalController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/controllers/withdrawalController.js b/backend/src/controllers/withdrawalController.js index e804567..65260bb 100644 --- a/backend/src/controllers/withdrawalController.js +++ b/backend/src/controllers/withdrawalController.js @@ -12,7 +12,7 @@ const withdrawalService = require('../services/withdrawalService'); const createWithdrawal = async (req, res) => { try { const userId = req.user.id; - const { amount, paymentMethod, paymentDetails } = req.body; + const { amount, currency, paymentMethod, paymentDetails } = req.body; // Validate required fields if (!amount || !paymentMethod || !paymentDetails) { @@ -27,6 +27,7 @@ const createWithdrawal = async (req, res) => { const withdrawal = await withdrawalService.createWithdrawal(userId, { amount, + currency, paymentMethod, paymentDetails, }); @@ -37,6 +38,7 @@ const createWithdrawal = async (req, res) => { id: withdrawal.id, withdrawalNo: withdrawal.withdrawalNo, amount: parseFloat(withdrawal.amount).toFixed(2), + currency: withdrawal.currency || 'CNY', paymentMethod: withdrawal.paymentMethod, status: withdrawal.status, createdAt: withdrawal.createdAt,