|
@@ -15,10 +15,12 @@ import com.fdkk.fdkkmeta.domain.entity.mysql.RoomEntity;
|
|
|
import com.fdkk.fdkkmeta.domain.entity.mysql.RotateFrameEntity;
|
|
|
import com.fdkk.fdkkmeta.domain.po.AnglePO;
|
|
|
import com.fdkk.fdkkmeta.domain.po.PointPO;
|
|
|
+import com.fdkk.fdkkmeta.redis.RedisCache;
|
|
|
import com.fdkk.fdkkmeta.service.BreakpointsService;
|
|
|
import com.fdkk.fdkkmeta.service.MoveFrameService;
|
|
|
import com.fdkk.fdkkmeta.service.RoomService;
|
|
|
import com.fdkk.fdkkmeta.service.RotateFrameService;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -30,10 +32,7 @@ import java.awt.geom.AffineTransform;
|
|
|
import java.io.File;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.DecimalFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/dev")
|
|
@@ -47,7 +46,8 @@ public class DevController {
|
|
|
RotateFrameService rotateFrameService;
|
|
|
@Autowired
|
|
|
MoveFrameService moveFrameService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ RedisCache redisCache;
|
|
|
/**
|
|
|
* test
|
|
|
*
|
|
@@ -154,4 +154,19 @@ public class DevController {
|
|
|
// }
|
|
|
return "";
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("redis")
|
|
|
+ public void testredis(){
|
|
|
+ redisCache.pfremove("setCacheRequest:rotate:"+1);
|
|
|
+ redisCache.setCacheList("setCacheRequest:rotate:"+1, Arrays.asList(1));
|
|
|
+ redisCache.setCacheList("setCacheRequest:rotate:"+1, Arrays.asList(2));
|
|
|
+ redisCache.setCacheList("setCacheRequest:rotate:"+1, Arrays.asList(3));
|
|
|
+
|
|
|
+ List<Object> cacheList = redisCache.getCacheList("setCacheRequest:rotate:" + 1);
|
|
|
+ redisCache.lRemove("setCacheRequest:rotate:"+1,0,2);
|
|
|
+ List<Object> cacheList1 = redisCache.getCacheList("setCacheRequest:rotate:" + 1);
|
|
|
+
|
|
|
+ System.out.println(cacheList);
|
|
|
+ }
|
|
|
+
|
|
|
}
|