startOfMonth()->subMonth()->format('Y-m'); $result = $inventory->paginateMonthlyInventoryReport([ 'month' => $month, 'product_code' => '', 'warehouse_provider' => '', 'category' => '', ], 1, 25); $this->info(sprintf('进销存 %s 首页已预热,共 %d 行。', $month, $result['total'])); } catch (Throwable $exception) { $failed = true; Log::error('默认进销存报表缓存预热失败。', ['exception' => $exception::class]); $this->error('默认进销存报表缓存预热失败。'); } try { $result = $alipay->paginate([], 'occurred_at', 'desc', 1, 10); $this->info(sprintf('淘系支付宝首页已预热,共 %d 行。', $result['total'])); $options = $alipay->filterOptionsForChannel( 'alipayCSV', StoreReceivingAlipayBillMirrorRepository::DATASET, true, ); $this->info(sprintf( '淘系支付宝筛选选项已预热,共 %d 个店铺、%d 个账单项目。', count($options['shops']), count($options['bill_items']), )); } catch (Throwable $exception) { $failed = true; Log::error('淘系支付宝报表缓存预热失败。', ['exception' => $exception::class]); $this->error('淘系支付宝报表缓存预热失败。'); } return $failed ? self::FAILURE : self::SUCCESS; } }