提现bug修改

This commit is contained in:
2026-01-09 16:29:56 +08:00
parent 77c7e300f5
commit 31c9d2a325

View File

@@ -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' => '成功'];
}
/*