Administrator
2025-12-11 66a84a112a8b29092249e84cdc4177d5a5b27ddc
src/main/java/com/xcong/excoin/utils/RedisUtils.java
@@ -88,6 +88,12 @@
     * @return 值
     */
    public Object get(String key) {
        // 在读取前添加短暂延迟
        try {
            Thread.sleep(50); // 等待50ms让Redis同步完成
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
        return key == null ? null : redisTemplate.opsForValue().get(key);
    }
@@ -98,6 +104,12 @@
     * @return 值
     */
    public String getString(String key) {
        // 在读取前添加短暂延迟
        try {
            Thread.sleep(50); // 等待50ms让Redis同步完成
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
        Object obj = key == null ? null : redisTemplate.opsForValue().get(key);
        if(obj!=null){
            return obj.toString();