diff --git a/service/app/server/Orders.php b/service/app/server/Orders.php index 8ae1f315..a4d87e3e 100644 --- a/service/app/server/Orders.php +++ b/service/app/server/Orders.php @@ -94,6 +94,10 @@ class Orders { public static function syncFromThird(OrdersModel $order) { + $redisKey = 'sync_order:' . $order->sn; + if (Redis::exists($redisKey)) { + return 1; + } $got = null; switch ($order->os) { @@ -144,6 +148,7 @@ class Orders { if ($back) { self::finance(0, $order->id, $order->asset_price); } + Redis::setEx($redisKey, 600, 1); return 0; }