From c18883f498664bcef31f31bbb6e680ed0e930e10 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期二, 23 一月 2024 17:12:14 +0800 Subject: [PATCH] zjh 2024/01/23--3 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java | 33 ++++++++++++--------------------- 1 files changed, 12 insertions(+), 21 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java index 0d03dae..caee526 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java @@ -599,26 +599,17 @@ return AjaxResult.success("鏆傛棤鏁版嵁"); } } - List<TjCustomer> customerLists = new ArrayList<>(); + List<TjCustomer> customerLists = null; if (type == 0) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); } if (type == 1) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); } asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); - if (customerLists != null && customerLists.size() > 0) { - Collections.reverse(customerLists); - List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); - Map<String, Object> map = new HashMap<>(); - map.put("date", customerList); - map.put("total", customerLists.size()); - return AjaxResult.success(map); - } else { - AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); - if (map != null) return map; - return AjaxResult.success("鏆傛椂娌℃湁鏁版嵁"); - } + AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); + if (map != null) return map; + return AjaxResult.success("鏆傛椂娌℃湁鏁版嵁"); } @@ -680,7 +671,7 @@ ) .collect(Collectors.toList()); - if (ksproList == null || ksproList.size() == 0) { + if (ksproList.size() == 0) { return AjaxResult.error("璇峰畬鍠勭瀹ら」鐩俊鎭�"); } List<TjCustomer> customerLis = new ArrayList<>(); @@ -821,15 +812,15 @@ return AjaxResult.success("鏆傛棤鏁版嵁"); } } - List<TjCustomer> customerLists = new ArrayList<>(); + List<TjCustomer> customerLists = null; if (type == 0) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); } if (type == 1) { - customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); +// customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); } - asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); - if (customerLists != null && customerLists.size() > 0) { +// asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); + if (customerLists.size() > 0) { Collections.reverse(customerLists); List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); Map<String, Object> map = new HashMap<>(); -- Gitblit v1.8.0