From 469ebf813ce45ec1773b482089362936d4d76d90 Mon Sep 17 00:00:00 2001 From: xing Date: Mon, 27 May 2024 20:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/notice.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Jobs/notice.php b/app/Jobs/notice.php index 353b47c..2edc344 100644 --- a/app/Jobs/notice.php +++ b/app/Jobs/notice.php @@ -196,11 +196,10 @@ public function changeProductState(): void $idss[] = $item['notice_id']; $ids[$item['result']['state']][] = $item['result']['itemId']; } - $now = date('Y-m-d H:i:s'); try { - DB::transaction(function () use ($ids, $idss, $now) { + DB::transaction(function () use ($ids, $idss) { foreach ($ids as $state => $item) { - Good::query()->whereIn('itemid', $item)->update(['state' => $state, 'updated_at' => $now]); + Good::query()->whereIn('itemid', $item)->update(['state' => $state]); } \App\Models\Notice::query()->whereIn('notice_id', $idss) ->update(['state' => 3]);