From 5832ff2a07a95f9d72a1bba16b3afa0c1b9f9b81 Mon Sep 17 00:00:00 2001 From: zhaoxianglong Date: Sun, 7 Apr 2024 11:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8B=96=E6=8B=BD=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/StatusController.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/StatusController.java b/zc-business/src/main/java/com/zc/business/controller/StatusController.java index 0bbc786a..aab1f2c6 100644 --- a/zc-business/src/main/java/com/zc/business/controller/StatusController.java +++ b/zc-business/src/main/java/com/zc/business/controller/StatusController.java @@ -107,7 +107,7 @@ public class StatusController extends BaseController { @GetMapping ("/rule") public AjaxResult setRule(String rule) { - redisCache.setCacheSetValue(ORDERRULE,rule); + redisCache.setCacheObject(ORDERRULE,rule); return AjaxResult.success(); } @@ -354,19 +354,19 @@ public class StatusController extends BaseController { //总数 maps.put("sum",String.valueOf(list.size())); subMap.put("全部设备",maps); -// Map ruleMap=new HashMap<>(); -// String orderRule=redisCache.getCacheObject(ORDERRULE); -// if(StringUtil.isNotEmpty(orderRule)){ -// ruleMap.put("rule",orderRule); -// subMap.put("排序规则",ruleMap); -// }else{ -// String[] rules = {"全部设备","高清网络枪型固定摄像机","高清网络球形摄像机","桥下高清网络球形摄像机","360°全景摄像机","180°全景摄像机", -// "门架式可变信息标志","雨棚可变信息标志","站前悬臂式可变信息标志","气象检测器","路段语音广播系统","护栏碰撞预警系统","毫米波雷达", -// "合流区预警系统","激光疲劳唤醒","一类交通量调查站","智能行车诱导系统"}; -// orderRule= Arrays.toString(rules); -// ruleMap.put("rule",orderRule); -// subMap.put("排序规则",ruleMap); -// } + Map ruleMap=new HashMap<>(); + String orderRule=redisCache.getCacheObject(ORDERRULE); + if(StringUtil.isNotEmpty(orderRule)){ + ruleMap.put("rule",orderRule); + subMap.put("排序规则",ruleMap); + }else{ + String[] rules = {"全部设备","高清网络枪型固定摄像机","高清网络球形摄像机","桥下高清网络球形摄像机","360°全景摄像机","180°全景摄像机", + "门架式可变信息标志","雨棚可变信息标志","站前悬臂式可变信息标志","气象检测器","路段语音广播系统","护栏碰撞预警系统","毫米波雷达", + "合流区预警系统","激光疲劳唤醒","一类交通量调查站","智能行车诱导系统"}; + orderRule= Arrays.toString(rules); + ruleMap.put("rule",orderRule); + subMap.put("排序规则",ruleMap); + } return AjaxResult.success(subMap); }