From fb47fc829e2f081c6aef37e837e9d50e79c9b701 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期三, 27 七月 2022 11:40:34 +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