package com.gci.boot.modules.msg.service.impl;

import com.gci.boot.common.util.JsonUtil;
import com.gci.boot.constant.CacheConstant;
import com.gci.boot.modules.msg.service.MsgPushService;
import com.gci.boot.modules.msg.vo.MsgRedisVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Objects;

@Service
@Slf4j
public class MsgPushServiceImpl implements MsgPushService {

    @Resource
    private RedisTemplate redisTemplate;

    @Override
    public void pushMsgToRedis(MsgRedisVO vo) {
        //还没长期模板、暂先屏蔽消息推reids
//        if(Objects.nonNull(vo)){
//            String string = JsonUtil.object2Json(vo);
//            redisTemplate.opsForList().leftPush(CacheConstant.WX_MSG_PUSH, string);
//        }
    }

}
