mirror of
https://gitee.com/liuxioabin/fengketrade.git
synced 2026-04-17 12:57:32 +08:00
1
This commit is contained in:
parent
82d0bcd09d
commit
2704e1610d
@ -76,6 +76,7 @@ class Withdraw
|
|||||||
$withdraw->withdraw_info = $withdrawInfo;
|
$withdraw->withdraw_info = $withdrawInfo;
|
||||||
$withdraw->status = 0;
|
$withdraw->status = 0;
|
||||||
$withdraw->platform = request()->header('platform');
|
$withdraw->platform = request()->header('platform');
|
||||||
|
$withdraw->createtime = time(); // 显式设置创建时间
|
||||||
$withdraw->save();
|
$withdraw->save();
|
||||||
|
|
||||||
// 佣金钱包变动
|
// 佣金钱包变动
|
||||||
@ -214,7 +215,10 @@ class Withdraw
|
|||||||
|
|
||||||
// 如果配置了时间限制,先检查是否满足条件
|
// 如果配置了时间限制,先检查是否满足条件
|
||||||
if ($limitHours > 0) {
|
if ($limitHours > 0) {
|
||||||
$createtime = intval($withdraw->createtime);
|
// 直接从数据库获取创建时间,避免模型获取器转换
|
||||||
|
$createtime = WithdrawModel::where('id', $withdraw->id)->value('createtime');
|
||||||
|
$createtime = $createtime ? intval($createtime) : 0;
|
||||||
|
|
||||||
if ($createtime > 0) {
|
if ($createtime > 0) {
|
||||||
$hoursDiff = (time() - $createtime) / 3600; // 3600秒 = 1小时
|
$hoursDiff = (time() - $createtime) / 3600; // 3600秒 = 1小时
|
||||||
if ($hoursDiff < $limitHours) {
|
if ($hoursDiff < $limitHours) {
|
||||||
@ -318,12 +322,15 @@ class Withdraw
|
|||||||
|
|
||||||
// 如果配置了时间限制,检查是否满足条件
|
// 如果配置了时间限制,检查是否满足条件
|
||||||
if ($limitHours > 0) {
|
if ($limitHours > 0) {
|
||||||
$createtime = intval($withdraw->createtime);
|
// 直接从数据库获取创建时间,避免模型获取器转换
|
||||||
|
$createtime = WithdrawModel::where('id', $withdraw->id)->value('createtime');
|
||||||
|
$createtime = $createtime ? intval($createtime) : 0;
|
||||||
|
|
||||||
if ($createtime > 0) {
|
if ($createtime > 0) {
|
||||||
$hoursDiff = (time() - $createtime) / 3600; // 3600秒 = 1小时
|
$hoursDiff = (time() - $createtime) / 3600; // 3600秒 = 1小时
|
||||||
|
|
||||||
// 调试日志:记录时间差
|
// 调试日志:记录时间差
|
||||||
\think\Log::write('提现时间限制检查 - 申请时间: ' . date('Y-m-d H:i:s', $createtime) . ', 当前时间: ' . date('Y-m-d H:i:s', time()) . ', 时间差(小时): ' . $hoursDiff, 'info');
|
\think\Log::write('提现时间限制检查 - 提现ID: ' . $withdraw->id . ', 申请时间: ' . date('Y-m-d H:i:s', $createtime) . ' (时间戳: ' . $createtime . '), 当前时间: ' . date('Y-m-d H:i:s', time()) . ' (时间戳: ' . time() . '), 时间差(小时): ' . $hoursDiff, 'info');
|
||||||
|
|
||||||
if ($hoursDiff < $limitHours) {
|
if ($hoursDiff < $limitHours) {
|
||||||
$remainingHours = ceil($limitHours - $hoursDiff);
|
$remainingHours = ceil($limitHours - $hoursDiff);
|
||||||
|
|||||||
@ -100,9 +100,11 @@ class Withdraw extends Common
|
|||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'agree':
|
case 'agree':
|
||||||
|
$withdrawLib->checkWithdrawTimeLimit($withdraw);
|
||||||
$withdraw = $withdrawLib->handleAgree($withdraw);
|
$withdraw = $withdrawLib->handleAgree($withdraw);
|
||||||
break;
|
break;
|
||||||
case 'withdraw':
|
case 'withdraw':
|
||||||
|
$withdrawLib->checkWithdrawTimeLimit($withdraw);
|
||||||
$withdraw = $withdrawLib->handleWithdraw($withdraw);
|
$withdraw = $withdrawLib->handleWithdraw($withdraw);
|
||||||
break;
|
break;
|
||||||
case 'agree&withdraw':
|
case 'agree&withdraw':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user