package com.fs.qw.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class QwRedisUtil {
    @Autowired
    private RedisTemplate<String, String> redisTemplate;
    public String HashOpsGet(String key,String field) {
        HashOperations<String, String, String> hashOps = redisTemplate.opsForHash();
        return hashOps.get(key,field);
    }

    public void HashOpsPut(String key,String field,String value) {
        HashOperations<String, String, String> hashOps = redisTemplate.opsForHash();
        hashOps.put(key,field,value);
    }
}
