2 天以前 5deaede4715d2703aadcd33f94256b339b9e9140
src/main/java/com/ruoyi/http/service/impl/RealTimeEnergyConsumptionServiceImpl.java
@@ -26,7 +26,9 @@
@Slf4j
public class RealTimeEnergyConsumptionServiceImpl implements RealTimeEnergyConsumptionService {
    private static final long REMOTE_CACHE_TTL_SECONDS = 10L;
    private static final long REMOTE_CACHE_TTL_SECONDS = 10L; // 缓存TTL,10秒
    private static final long REMOTE_CACHE_TTL_SECONDS_30 = 30L; // 缓存TTL,30秒
    private static final String URL = "https://new.e-elitech.cn/api/data-api";
@@ -275,6 +277,6 @@
        if (result == null || result.trim().isEmpty()) {
            return;
        }
        redisTemplate.opsForValue().set(cacheKey, result, REMOTE_CACHE_TTL_SECONDS, TimeUnit.SECONDS);
        redisTemplate.opsForValue().set(cacheKey, result, REMOTE_CACHE_TTL_SECONDS_30, TimeUnit.SECONDS);
    }
}