From 423b61bfb18ceab430303bada28f93631f0e8392 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 12 八月 2022 16:05:17 +0800
Subject: [PATCH] 充电桩

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java
index 3ca62af..3c19b5d 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java
@@ -118,6 +118,15 @@
     }
 
 
+    /**
+     * 璇虹摝鍒楄〃
+     *
+     * @param baseConditionVO
+     * @param keyword
+     * @param order
+     * @param seq
+     * @return
+     */
     public List<LedPlayerEntity> ledPlayerEntityList(BaseConditionVO baseConditionVO, String keyword, Integer order, Integer seq) {
         //鎺掑簭瀛楁
         String orderByResult = OrderByEnums.VNNOX_ID.getCode();
@@ -150,7 +159,9 @@
         String orderBy = orderByResult + " " + orderBySeq;
 
 
-        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy);
+        if (baseConditionVO != null) {
+            PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy);
+        }
         List<LedPlayerEntity> list;
         //瓒呯
         if (SecurityUtils.getClientId() == null) {
@@ -161,4 +172,38 @@
         return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
     }
 
+    /**
+     * 璇虹摝鍒楄〃锛堢敤浜庨椤垫暟鎹粺璁★級
+     *
+     * @return
+     */
+    public List<LedPlayerEntity> ledPlayerEntityListOnHome() {
+        List<LedPlayerEntity> list;
+        //瓒呯
+        if (SecurityUtils.getClientId() == null) {
+            list = ledPlayerEntityMapper.ledPlayerEntityList(null, null);
+        } else {
+            list = ledPlayerEntityMapper.ledPlayerEntityList(null, SecurityUtils.getUserId());
+        }
+        return list == null ? new ArrayList<>() : list;
+    }
+
+    /**
+     * 璇虹摝鍒楄〃锛堢敤浜庣粦瀹氾級
+     *
+     * @param keyword
+     * @return
+     */
+    public List<LedPlayerEntity> ledPlayerEntityListOnBinding(String keyword) {
+
+        List<LedPlayerEntity> list;
+        //瓒呯
+        if (SecurityUtils.getClientId() == null) {
+            list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, null);
+        } else {
+            list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, SecurityUtils.getUserId());
+        }
+        return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
+    }
+
 }

--
Gitblit v1.9.3