From 3fa847083d45461b4e5ee7ec3dbd9247e8a5047c Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期三, 12 一月 2022 10:28:05 +0800
Subject: [PATCH] fix

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
index 0285f8c..f2b7920 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
@@ -49,8 +49,9 @@
     }
 
     @GetMapping("/list")
-    public ResponseVO<Object> listPole(@RequestParam String keyword) {
-        LambdaQueryWrapper<Pole> wrapper = Wrappers.lambdaQuery(Pole.class);
+    public ResponseVO<Object> listPole(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) {
+        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
+        LambdaQueryWrapper<Pole> wrapper = Wrappers.lambdaQuery(Pole.class).orderByDesc(Pole::getId);
         if (StrUtil.isNotBlank(keyword)) {
             wrapper.like(Pole::getPoleCode, keyword)
                     .or(lampPostLambdaQueryWrapper -> {
@@ -58,7 +59,7 @@
                     });
         }
         List<Pole> list = poleService.list(wrapper);
-        return ResponseUtil.success(list);
+        return ResponseUtil.successPage(list);
     }
 
     @GetMapping("listPoleAndState")
@@ -72,9 +73,9 @@
     /**
      * 璁剧疆涓夊厓鐮�
      */
-    @PostMapping("/setMac/{poleId}")
-    public ResponseVO<Object> setMac(@PathVariable Long poleId) {
-        return ResponseUtil.success(poleService.setMac(poleId));
+    @PostMapping("/setMac/{baseMac}")
+    public ResponseVO<Object> setMac(@PathVariable String baseMac) {
+        return ResponseUtil.success(poleService.setMac(baseMac));
     }
 
     /**

--
Gitblit v1.9.3