|
|
|
|
@ -42,7 +42,7 @@ class SyncAlipayRechargeState extends Command
|
|
|
|
|
{
|
|
|
|
|
$threshold = 5;
|
|
|
|
|
$offset_seconds = 40; //支付发起后多少秒开始轮询
|
|
|
|
|
$due_minutes = 101; //支付发起后第一次开始轮询的时间往后延迟5分钟后不再轮询
|
|
|
|
|
$due_minutes = 110; //支付发起后第一次开始轮询的时间往后延迟5分钟后不再轮询
|
|
|
|
|
$last_id = cache("last_sync_alipay_recharge_id", 0);
|
|
|
|
|
|
|
|
|
|
DB::enableQueryLog();
|
|
|
|
|
@ -53,8 +53,6 @@ class SyncAlipayRechargeState extends Command
|
|
|
|
|
->whereRaw("(" . time() . " between (UNIX_TIMESTAMP(`created_at`) + {$offset_seconds}) and (UNIX_TIMESTAMP(`created_at`) + " . ($due_minutes * 60) . " + {$offset_seconds}))")
|
|
|
|
|
->limit($threshold)
|
|
|
|
|
->get();
|
|
|
|
|
dump(DB::getQueryLog());
|
|
|
|
|
dd($recharges);
|
|
|
|
|
if (!$recharges->count()) {
|
|
|
|
|
cache(['last_sync_alipay_recharge_id' => null], now()->addSeconds(90));
|
|
|
|
|
echo "nothing";
|
|
|
|
|
|