This commit is contained in:
Billy 2025-11-20 19:22:27 +08:00
parent cc42c047d1
commit 8c62ee49f7
2 changed files with 16 additions and 7 deletions

View File

@ -269,14 +269,9 @@ class Withdraw
return $this->handleLog($withdraw, '同意提现申请', $oper);
}
// 处理打款
public function handleWithdraw($withdraw, $oper = null)
// 检查提现打款时间限制(公共方法,可在打款前调用)
public function checkWithdrawTimeLimit($withdraw)
{
$withDrawStatus = false;
if ($withdraw->status != 1) {
throw new ShoproException('请勿重复操作');
}
// 检查提现打款时间限制(小时)- 每次都重新读取配置确保最新
$freshConfig = sheep_config('shop.recharge_withdraw.withdraw', false);
$limitHours = 0;
@ -310,6 +305,18 @@ class Withdraw
}
}
}
}
// 处理打款
public function handleWithdraw($withdraw, $oper = null)
{
$withDrawStatus = false;
if ($withdraw->status != 1) {
throw new ShoproException('请勿重复操作');
}
// 检查提现打款时间限制
$this->checkWithdrawTimeLimit($withdraw);
if ($withdraw->withdraw_type !== 'bank') {
$withDrawStatus = $this->handleTransfer($withdraw);

View File

@ -106,6 +106,8 @@ class Withdraw extends Common
$withdraw = $withdrawLib->handleWithdraw($withdraw);
break;
case 'agree&withdraw':
// 先检查时间限制,再执行同意和打款操作
$withdrawLib->checkWithdrawTimeLimit($withdraw);
$withdraw = $withdrawLib->handleAgree($withdraw);
$withdraw = $withdrawLib->handleWithdraw($withdraw);
break;