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]);