package com.cdzy.operations; import com.cdzy.operations.utils.RedisUtil; import com.mybatisflex.core.keygen.impl.SnowFlakeIDKeyGenerator; import jakarta.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import java.io.IOException; import java.util.concurrent.TimeUnit; @SpringBootTest class EbikeOperationsApplicationTests { @Resource RedisUtil redisUtil; @Test void contextLoads() throws IOException { SnowFlakeIDKeyGenerator generator = new SnowFlakeIDKeyGenerator(); long nextId = generator.nextId(); redisUtil.saveDispatchOrder(nextId, "2", 60L, TimeUnit.SECONDS); } }