perf: 优化流量消费相关代码性能,解决流量纪录与已用流量有概率不一致的问题

This commit is contained in:
xboard
2024-04-27 17:06:57 +08:00
parent 4438fee3ca
commit be9ed269fa
12 changed files with 246 additions and 171 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class CheckOrder extends Command
public function handle()
{
ini_set('memory_limit', -1);
$orders = Order::whereIn('status', [0, 1])
$orders = Order::whereIn('status', [Order::STATUS_PENDING, Order::STATUS_PROCESSING])
->orderBy('created_at', 'ASC')
->get();
foreach ($orders as $order) {