From e0a148e140c45c0efe4a89767d8dadd53ec2fb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Sun, 23 Apr 2023 14:04:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#10000=20=E5=BA=97=E9=93=BA=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Shop/ShopsController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Shop/ShopsController.php b/app/Http/Controllers/Shop/ShopsController.php index 858f3b2..26af3b6 100644 --- a/app/Http/Controllers/Shop/ShopsController.php +++ b/app/Http/Controllers/Shop/ShopsController.php @@ -190,17 +190,17 @@ class ShopsController extends Controller public function syncStock(Request $request) { $shopId = $request->get('shop_id'); - $skus = GoodsSku::query() - ->where('status', '>', 0) - ->whereNotNull('external_sku_id') - ->pluck('stock', 'external_sku_id') - ->toArray(); $builder = Shop::query()->where('expires_at', '>', time()); if ('all' === $shopId) { $shops = $builder->get(); } else { $shops = $builder->where('id', $shopId)->get(); } + $skus = GoodsSku::query() + ->where('updated_at', '>', date('Y-m-d 07:01:00')) + ->whereNotNull('external_sku_id') + ->pluck('stock', 'external_sku_id') + ->toArray(); foreach ($shops as $shop) { $business = BusinessFactory::init()->make($shop->plat_id); $business->setShop($shop);