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('淘系支付宝报表缓存预热失败。'); } try { $result = $smallPayments->paginate([ 'from' => now()->subDays(29)->format('Y-m-d') . 'T00:00:00', 'to' => now()->format('Y-m-d') . 'T23:59:59', 'work_order_no' => '', 'shop_name' => '', 'transaction_no' => '', 'online_order_no' => '', 'status' => '', 'payment_reason' => '', ], 1, 25); $options = $smallPayments->filterOptions(); $this->info(sprintf( '小额打款首页已预热,共 %d 行、%d 个店铺、%d 个打款原因。', $result['total'], count($options['shops']), count($options['payment_reasons']), )); } catch (Throwable $exception) { $failed = true; Log::error('小额打款报表缓存预热失败。', ['exception' => $exception::class]); $this->error('小额打款报表缓存预热失败。'); } return $failed ? self::FAILURE : self::SUCCESS; } }