|
@@ -3,7 +3,9 @@ package com.imcs.admin.business.controller;
|
|
import com.imcs.admin.business.service.BigScreenDetailService;
|
|
import com.imcs.admin.business.service.BigScreenDetailService;
|
|
import com.imcs.admin.common.PageParam;
|
|
import com.imcs.admin.common.PageParam;
|
|
import com.imcs.admin.common.Result;
|
|
import com.imcs.admin.common.Result;
|
|
-import com.imcs.admin.db.service.JdbcService;
|
|
|
|
|
|
+import com.imcs.admin.common.constants.Constants;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -14,8 +16,23 @@ public class BigScreenDetailController {
|
|
@Resource
|
|
@Resource
|
|
private BigScreenDetailService bigScreenDetailService;
|
|
private BigScreenDetailService bigScreenDetailService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private RedisTemplate redisTemplate;
|
|
|
|
+
|
|
@RequestMapping("/detail")
|
|
@RequestMapping("/detail")
|
|
public Result getDeviceDetail(@RequestBody PageParam pageParam){
|
|
public Result getDeviceDetail(@RequestBody PageParam pageParam){
|
|
return new Result(bigScreenDetailService.getBigScreenDetail(pageParam));
|
|
return new Result(bigScreenDetailService.getBigScreenDetail(pageParam));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @GetMapping("/setRefresh/{isRefresh}")
|
|
|
|
+ public Result setRefresh(@PathVariable Boolean isRefresh){
|
|
|
|
+ redisTemplate.opsForValue().set(Constants.IS_REFRESH,isRefresh);
|
|
|
|
+ return new Result();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("/getRefresh")
|
|
|
|
+ public Result getRefresh(){
|
|
|
|
+ Boolean isRefresh=Boolean.valueOf(redisTemplate.opsForValue().get(Constants.IS_REFRESH).toString());
|
|
|
|
+ return new Result(isRefresh);
|
|
|
|
+ }
|
|
}
|
|
}
|