| #556 | $finalData[$symbol . 'swingValue'] = round($swingValue, 2); |
| #557 | $finalData[$symbol . 'swingRangeValue'] = round($swingRangeValue, 2); |
| #558 | |
| #559 | // 检查 lastPrice 是否为0或空 |
| #560 | if (empty($finalData[$symbol . 'lastPrice']) || $finalData[$symbol . 'lastPrice'] == 0) { |
| #561 | error_log("符号{$symbol}的lastPrice为空或为零,未写入缓存文件."); |
| #562 | $retrySymbols[] = $symbol; // 记录需要重试的符号 |
| #563 | } else { |
| #564 | // 将数组转换为JSON格式字符串并写入文件 |
| #565 | $cacheFile = $jsonDataDir . '/' . urlencode($symbol) . '.json'; |