From 31c9d2a325d2e98866988477342f64678e65e9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Fri, 9 Jan 2026 16:29:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserWithdrawal.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/api/model/UserWithdrawal.php b/application/api/model/UserWithdrawal.php index 1af3c454..02b91693 100644 --- a/application/api/model/UserWithdrawal.php +++ b/application/api/model/UserWithdrawal.php @@ -180,6 +180,12 @@ class UserWithdrawal extends Model */ public function withdrawal_fail($order_id){ $withdraw_info = db::name('vs_user_withdrawal')->where('order_sn', $order_id)->find(); + if (empty($withdraw_info)) { + return ['code' => 0, 'msg' => '提现订单不存在']; + } + if ($withdraw_info['refund_time'] != 0) { + return ['code' => 0, 'msg' => '订单已处理过退款']; + } //退回提现金额(释放冻结金额) //钻石兑换人民币比例 $diamond_to_rmb_ratio = get_system_config_value('diamond_to_rmb_ratio'); @@ -193,6 +199,8 @@ class UserWithdrawal extends Model if ($reslut['code'] != 1) { return ['code' => 0, 'msg' => $reslut['msg']]; } + //修改退款时间 + db::name('vs_user_withdrawal')->where('wid', $withdraw_info['wid'])->update(['refund_time' => time()]); return ['code' => 1, 'msg' => '成功']; } /*