public Seckill getSeckill(long seckillId) {
        String key = "seckill:" + seckillId;
        Seckill seckill = (Seckill) redisTemplate.opsForValue().get(key);
        if (seckill != null) {
            return seckill;
        } else {
            seckill = seckillMapper.selectById(seckillId);
            if (seckill == null) {
                throw new RuntimeException("秒杀活动不存在！");
            }
            putSeckill(seckill);
            return seckill;
        }
    }
@Test
    void getSeckillSuccessCache() {
        long seckillId = 1001L;
        String key = "seckill:" + seckillId;
        ValueOperations valueOperations = mock(ValueOperations.class);
        when(redisTemplate.opsForValue()).thenReturn(valueOperations);
        when(valueOperations.get(key)).thenReturn(null);
        when(seckillMapper.selectById(seckillId)).thenReturn(new Seckill());

        assertNotNull(redisService.getSeckill(seckillId));
    }