generateDailyTrend($date, $itemId, $currencyType); } /** * 批量生成多日价格趋势数据 */ public static function generateMultipleDaysTrends( string $startDate, string $endDate, ?int $itemId = null, ?FUND_CURRENCY_TYPE $currencyType = null ): Collection { $logic = new MexDailyPriceTrendLogic(); return $logic->generateMultipleDaysTrends($startDate, $endDate, $itemId, $currencyType); } /** * 获取商品的价格趋势历史 */ public static function getItemPriceTrends( int $itemId, FUND_CURRENCY_TYPE $currencyType, string $startDate, string $endDate, int $limit = 100 ): Collection { $logic = new MexDailyPriceTrendLogic(); return $logic->getItemPriceTrends($itemId, $currencyType, $startDate, $endDate, $limit); } /** * 获取价格趋势统计信息 */ public static function getTrendStatistics( int $itemId, FUND_CURRENCY_TYPE $currencyType, string $startDate, string $endDate ): array { $logic = new MexDailyPriceTrendLogic(); return $logic->getTrendStatistics($itemId, $currencyType, $startDate, $endDate); } /** * 生成今日所有商品的价格趋势 */ public static function generateTodayTrends(): Collection { $today = date('Y-m-d'); $logic = new MexDailyPriceTrendLogic(); return $logic->generateMultipleDaysTrends($today, $today); } /** * 生成昨日所有商品的价格趋势 */ public static function generateYesterdayTrends(): Collection { $yesterday = date('Y-m-d', strtotime('-1 day')); $logic = new MexDailyPriceTrendLogic(); return $logic->generateMultipleDaysTrends($yesterday, $yesterday); } }