From ff27d20316588ff9684c97343941ce0f0b5bbced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E7=82=8A?= <924182103@qq.com> Date: Fri, 13 Dec 2024 13:23:38 +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 | 2 +- app/Console/Kernel.php | 2 +- app/Http/Service/MessageService.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/CheckSkuQualityPeriod.php b/app/Console/Commands/CheckSkuQualityPeriod.php index 017a29c..621874e 100644 --- a/app/Console/Commands/CheckSkuQualityPeriod.php +++ b/app/Console/Commands/CheckSkuQualityPeriod.php @@ -49,7 +49,7 @@ class CheckSkuQualityPeriod extends Command //查询未处理过的快过期的异常订单 $purchaseRecords = DB::table('purchase_records as a') - ->select("a.created_at","a.date", "a.num", "b.title", "b.stock", "a.id", "b.id as sku_id", "b.external_sku_id") + ->select("a.created_at","a.date", "a.num", "b.title","b.name", "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(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1b0f9e6..0216fa8 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -53,7 +53,7 @@ class Kernel extends ConsoleKernel //新增价格校验 $schedule->command(CheckPrice::class)->everyFifteenMinutes(); //保质期 - $schedule->command(CheckSkuQualityPeriod::class)->dailyAt('05:30'); + $schedule->command(CheckSkuQualityPeriod::class)->dailyAt('11:00'); //快团团售后单拉取 $schedule->command(KttOrderAfterSaleQuery::class)->everyFifteenMinutes(); //同步售卖信息和报损相关数据 diff --git a/app/Http/Service/MessageService.php b/app/Http/Service/MessageService.php index 930635c..f211773 100644 --- a/app/Http/Service/MessageService.php +++ b/app/Http/Service/MessageService.php @@ -67,7 +67,7 @@ class MessageService $arr['role_id'] = $v; $arr['unique_key'] = $date . "-" . $goodsSku['id'] . "-" . $v; $arr['type'] = MessageTypeEnum::LOW_STOCK_NOTICE; - $arr['content'] = $date . "规格{$goodsSku['title']}库存可能需要补货,当前实际库存{$goodsSku['stock']},上次库存盘点数{$inventory}"; + $arr['content'] = $date . "规格{$goodsSku['name']}库存可能需要补货,当前实际库存{$goodsSku['stock']},上次库存盘点数{$inventory}"; $this->saveWebsiteMessages($arr); } } @@ -89,7 +89,7 @@ class MessageService $arr['role_id'] = $v; $arr['unique_key'] = $date . "-" . $goodsSku['id'] . "-" . $v;//这个场景下实际是采购单的id $arr['type'] = MessageTypeEnum::QUALITY_PERIOD_EXPIRE_NOTICE; - $arr['content'] = $date . "规格{$goodsSku['title']}编码{$goodsSku['external_sku_id']},即将过期,目前实际库存{$goodsSku['stock']},当时采购数量为{$goodsSku['num']},录入采购时间为{$goodsSku['created_at']}"; + $arr['content'] = $date . "规格{$goodsSku['name']}编码{$goodsSku['external_sku_id']},即将过期,目前实际库存{$goodsSku['stock']},当时采购数量为{$goodsSku['num']},录入采购时间为{$goodsSku['created_at']}"; $this->saveWebsiteMessages($arr); }