package cn.superdesk.uniorder.dubbo.provider.common;

import cn.superdesk.uniorder.common.mq.redis.constants.RedisKeyPrefix;
import cn.superdesk.uniorder.dubbo.facade._commom.DubboRedisService;
import cn.superdesk.uniorder.common.mq.redis.service.RedisService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * @Description: nnd 能不能规范点呀
 * @Author: linjinyu
 * @CreateDate: 2021/10/27 下午5:32
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/10/27 下午5:32
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboRedisServiceImpl implements DubboRedisService {

	@Autowired
	private RedisService redisService;

	@Override
	public void saveObject(String value, RedisKeyPrefix keyPrefix, String key, long time) {

		redisService.saveObject(value, keyPrefix, key, time);
	}

	@Override
	public Object getKey(RedisKeyPrefix keyPrefix, String key) {

		return redisService.getKey(keyPrefix, key);
	}

	@Override
	public void deleteKey(RedisKeyPrefix keyPrefix, String key) {

		redisService.deleteKey(keyPrefix, key);
	}

	@Override
	public Object hgetKey(String redisKey, String hashKey) {

		return redisService.hashGetByKey(redisKey, hashKey);
	}


}
