From 12bfcb0241d115f35c1501db2348821c1d357f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E7=82=8A?= <924182103@qq.com> Date: Thu, 12 Dec 2024 16:03:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/CheckSkuQualityPeriod.php | 8 ++++---- public/nginx.htaccess | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 public/nginx.htaccess diff --git a/app/Console/Commands/CheckSkuQualityPeriod.php b/app/Console/Commands/CheckSkuQualityPeriod.php index 4f76c1e..017a29c 100644 --- a/app/Console/Commands/CheckSkuQualityPeriod.php +++ b/app/Console/Commands/CheckSkuQualityPeriod.php @@ -49,11 +49,12 @@ class CheckSkuQualityPeriod extends Command //查询未处理过的快过期的异常订单 $purchaseRecords = DB::table('purchase_records as a') - ->select("a.created_at", "a.num", "b.title", "b.stock", "a.id", "b.id as sku_id", "b.external_sku_id") - ->leftJoin('goods_skus as b', 'a.sku_id', '=', 'b.id') + ->select("a.created_at","a.date", "a.num", "b.title", "b.stock", "a.id", "b.id as sku_id", "b.external_sku_id") + ->leftJoin('goods_skus as b', 'a.external_sku_id', '=', 'b.external_sku_id') ->where("a.check_status", "=", 0) ->whereBetween('a.expire_time', [$startTime, $endTime])->get(); - Log::info('purchaseRecords', (array)$purchaseRecords); + Log::info('采购临期记录', [$purchaseRecords]); + if ($purchaseRecords->isNotEmpty()) { $messageService = new MessageService(); $updateIds = []; @@ -67,7 +68,6 @@ class CheckSkuQualityPeriod extends Command } $updateIds[] = $v->id; //更新下状态 - } PurchaseRecords::query()->whereIn('id', $updateIds)->update([ "check_status" => 1 diff --git a/public/nginx.htaccess b/public/nginx.htaccess new file mode 100644 index 0000000..67728b1 --- /dev/null +++ b/public/nginx.htaccess @@ -0,0 +1 @@ +try_files $uri $uri/ /index.php?$query_string; \ No newline at end of file