package com.cftech.core.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;

/**
 * redis 缓存类
 * Created by 16444 on 2020/10/19.
 */
@Slf4j
@Component
public class RedisCacheUtils {

    @Autowired
    private RedisTemplate<String, String> redisTemplates;

    private RedisTemplate<String, String> getConfig() {
        StringRedisSerializer strSerializer = new StringRedisSerializer();
        redisTemplates.setKeySerializer(strSerializer);
        redisTemplates.setHashKeySerializer(strSerializer);
        redisTemplates.setHashValueSerializer(strSerializer);
        //redisTemplate.setValueSerializer(stringSerializer);
        return redisTemplates;
    }

    /**
     * 获取轮询的药师，医生
     * @return
     */
    public String findPollingUsers() {
        //获取药师队列

        //获取医生队列
        return "";
    }

    public String findPollingDoctor() {
        return "";
    }

    public String findPollingCusService() {
        return "";
    }
}
