From f8d5a58c5536b72117c342e5a22bd44aa6320c23 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 22 四月 2022 19:10:02 +0800
Subject: [PATCH] fix
---
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/VnnoxController.java | 43 +++----------------------------------------
1 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/VnnoxController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/VnnoxController.java
index 96b6c1c..2a9e286 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/VnnoxController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/VnnoxController.java
@@ -140,50 +140,13 @@
if (!permissionConfig.check(MenuEnum.LED_LIST.getCode())) {
return ResponseUtil.fail("缂哄皯瀵瑰簲鐢ㄦ埛鏉冮檺");
}
- PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
- LambdaQueryWrapper<LedPlayerEntity> wrapper = Wrappers.lambdaQuery(LedPlayerEntity.class);
- if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) {
- //wrapper.eq(LedPlayerEntity::get)
- return ResponseUtil.success(""); // todo
- } else {
- wrapper.like(LedPlayerEntity::getPlayerName, keyword)
- .or(
- querywrapper -> {
- querywrapper.like(LedPlayerEntity::getName, keyword);
- }
- ).or(
- sn->{
- sn.like(LedPlayerEntity::getSn,keyword);
- }
- );
- List<LedPlayerEntity> list = ledPlayerEntityService.list(wrapper);
- List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
- entities.forEach(
- led -> {
- PoleBinding binding = bindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class)
- .eq(PoleBinding::getDeviceType, 1).eq(PoleBinding::getDeviceCode, led.getSn()));
- if (binding != null) {
- led.setPoleId(poleService.getById(binding.getPoleId()).getId());
- led.setPoleName(poleService.getById(binding.getPoleId()).getPoleName());
- }
- }
- );
- return ResponseUtil.success(entities);
- }
+ return ResponseUtil.successPage(ledPlayerEntityService.ledPlayerEntityList(baseConditionVO, keyword));
}
@GetMapping("/onLineList")
public ResponseVO<Object> onLineList(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) {
-// public ResponseVO<Object> onLineList(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) {
- PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
- LambdaQueryWrapper<LedPlayerEntity> wrapper = Wrappers.lambdaQuery(LedPlayerEntity.class);
- if (AdministratorEnums.CUSTOMER.getCode().equals(SecurityUtils.getAdministratorIdentity())) {
- //wrapper.eq(LedPlayerEntity::get)
- return ResponseUtil.success(""); // todo
- } else {
- wrapper.like(LedPlayerEntity::getPlayerName, keyword);
- List<LedPlayerEntity> list = ledPlayerEntityService.list(wrapper);
+ List<LedPlayerEntity> list = ledPlayerEntityService.ledPlayerEntityList(baseConditionVO, keyword);
List<LedPlayerEntity> entities = vnnoxService.setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list));
List<LedPlayerEntity> online = new ArrayList<>();
for (LedPlayerEntity ledPlayer : entities) {
@@ -192,7 +155,7 @@
}
}
return ResponseUtil.success(online);
- }
+
}
@GetMapping("/getVnnoxInfo/{sn}")
--
Gitblit v1.9.3