From c3e734b8a5370f3d4b0102a86721a98adb8e3476 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期三, 14 九月 2022 15:28:38 +0800
Subject: [PATCH] changes

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/service/LedPlayerEntityService.java |   40 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 35 insertions(+), 5 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 cc8b16c..8ccf348 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
@@ -53,10 +53,7 @@
          */
         List<String> listCode = new ArrayList<>(1);
         listCode.add(ledPlayerEntity.getSn());
-        String content = "{ 璁惧id:" + ledPlayerEntity.getId() + "璁惧code锛�" + ledPlayerEntity.getSn()
-                + "璇虹摝playId:" + ledPlayerEntity.getPlayerId()
-                + "璇虹摝璁惧鍚嶇О:" + ledPlayerEntity.getName() +
-                "}";
+        String content = "{ 璁惧id:" + ledPlayerEntity.getId() + "璁惧code锛�" + ledPlayerEntity.getSn() + "璇虹摝playId:" + ledPlayerEntity.getPlayerId() + "璇虹摝璁惧鍚嶇О:" + ledPlayerEntity.getName() + "}";
 
         StoreOperationRecordsUtils.storeOperationData(listCode, null, "璇虹摝璁惧鏂板", content);
         /**
@@ -118,6 +115,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 +156,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,6 +169,28 @@
         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;

--
Gitblit v1.9.3