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); }