From 33ecbd69aca2ccc58d47f467f3f7266b37fa9dfc Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 27 五月 2022 18:44:38 +0800
Subject: [PATCH] fix
---
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java | 46 +++++++++++++++++++++++++++-------------------
1 files changed, 27 insertions(+), 19 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
index 383d07a..c00752e 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
@@ -1,7 +1,9 @@
package com.sandu.ximon.admin.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.pagehelper.util.StringUtil;
import com.sandu.common.domain.ResponseVO;
import com.sandu.common.util.ResponseUtil;
import com.sandu.common.util.SpringContextHolder;
@@ -18,6 +20,7 @@
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
@@ -40,11 +43,16 @@
* 瀹㈡埛鍒楄〃
*/
@GetMapping("/getClientList")
- public ResponseVO<Object> getClientList() {
+ public ResponseVO<Object> getClientList(@RequestParam(required = false, value = "keyword") String keyword) {
LambdaQueryWrapper<Client> wrapper = Wrappers.lambdaQuery(Client.class);
//闈炶秴绠″彧鑳界湅鍒拌嚜宸变笅灞炵殑瀹㈡埛淇℃伅
if (SecurityUtils.getClientId() != null) {
wrapper.eq(Client::getSuperiorId, SecurityUtils.getUserId());
+ }
+ if (!StringUtil.isEmpty(keyword)) {
+ wrapper.eq(Client::getId, keyword).or(w -> {
+ w.eq(Client::getClientName, keyword);
+ });
}
List<Client> list = SpringContextHolder.getBean(ClientService.class).list(wrapper);
@@ -66,12 +74,12 @@
private final PoleMapper poleMapper;
@GetMapping("/getPoleList")
- public ResponseVO<Object> getPoleList() {
+ public ResponseVO<Object> getPoleList(@RequestParam(required = false, value = "keyword") String keyword) {
List<Pole> poleList;
if (SecurityUtils.getClientId() == null) {
- poleList = poleMapper.queryPoleOnLineStatesList(null, null, null, null, null, null);
+ poleList = poleMapper.getPoleListOnBinding(null, keyword);
} else {
- poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), null, null, null, null, null);
+ poleList = poleMapper.getPoleListOnBinding(SecurityUtils.getUserId(), keyword);
}
List<Map> mapList = new ArrayList<>();
@@ -91,8 +99,8 @@
private final LightMapper lightMapper;
@GetMapping("/getLightList")
- public ResponseVO<Object> getLightList() {
- List<LightBo> listLight = lightMapper.listLight(SecurityUtils.getClientId(), null);
+ public ResponseVO<Object> getLightList(@RequestParam(required = false, value = "keyword") String keyword) {
+ List<LightBo> listLight = lightMapper.listLightOnBinding(SecurityUtils.getClientId(), keyword);
List<Map> mapList = new ArrayList<>();
@@ -112,9 +120,9 @@
* NLED鍒楄〃(璇虹摝璁惧)
*/
@GetMapping("/getLedPlayerEntityList")
- public ResponseVO<Object> getLedPlayerEntityList() {
+ public ResponseVO<Object> getLedPlayerEntityList(@RequestParam(required = false, value = "keyword") String keyword) {
List<LedPlayerEntity> list = SpringContextHolder.getBean(LedPlayerEntityService.class).
- ledPlayerEntityList(null, null, null, null);
+ ledPlayerEntityListOnBinding(keyword);
List<Map> mapList = new ArrayList<>();
Map map;
@@ -160,8 +168,8 @@
private final LEDProgramService ledProgramService;
@GetMapping("/getNledProgeamList")
- public ResponseVO<Object> getNledProgeamList() {
- List<LEDProgram> ledPrograms = ledProgramService.listProgram(null, null,null,null);
+ public ResponseVO<Object> getNledProgeamList(@RequestParam(required = false, value = "keyword") String keyword) {
+ List<LEDProgram> ledPrograms = ledProgramService.listProgramOnBinding(keyword);
List<Map> mapList = new ArrayList<>();
Map map;
for (LEDProgram bean : ledPrograms) {
@@ -182,8 +190,8 @@
private final PoleLightemitService sLedService;
@GetMapping("/getSledList")
- public ResponseVO<Object> getSledList() {
- List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLed(null, null, null, false);
+ public ResponseVO<Object> getSledList(@RequestParam(required = false, value = "keyword") String keyword) {
+ List<PoleLightemitEntity> poleLightemitEntities = sLedService.listLedOnBinding(keyword);
List<Map> mapList = new ArrayList<>();
Map map;
for (PoleLightemitEntity bean : poleLightemitEntities) {
@@ -207,13 +215,13 @@
private final MonitorMapper monitorMapper;
@GetMapping("/getMonitorList")
- public ResponseVO<Object> getMonitorList() {
+ public ResponseVO<Object> getMonitorList(@RequestParam(required = false, value = "keyword") String keyword) {
List<MonitorBo> monitorBos;
//瓒呯
if (SecurityUtils.getClientId() == null) {
- monitorBos = monitorMapper.listMonitorDeviceSerial1(null, null, 2, null);
+ monitorBos = monitorMapper.newListMonitorOnBind(null, keyword);
} else {
- monitorBos = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2, null);
+ monitorBos = monitorMapper.newListMonitorOnBind(SecurityUtils.getUserId(), keyword);
}
List<Map> mapList = new ArrayList<>();
Map map;
@@ -236,12 +244,12 @@
private final IpVolumeService ipVolumeService;
@GetMapping("/getIpVolumeList")
- public ResponseVO<Object> getIpVolumeList() {
+ public ResponseVO<Object> getIpVolumeList(@RequestParam(required = false, value = "keyword") String keyword) {
BroadcastTerminalV2Param param = new BroadcastTerminalV2Param();
param.setBindingState(2);
param.setKeyword(null);
param.setWorkState(2);
- List<BroadcastTerminalV2EntityBo> broadcastTerminalList = ipVolumeService.getBroadcastTerminalList(null, null, null, param);
+ List<BroadcastTerminalV2EntityBo> broadcastTerminalList = ipVolumeService.newIpTerminalList(keyword);
List<Map> mapList = new ArrayList<>();
Map map;
for (BroadcastTerminalV2EntityBo bean : broadcastTerminalList) {
@@ -263,8 +271,8 @@
private final IpVolumeFileService ipVolumeFileService;
@GetMapping("/getIpFileList")
- public ResponseVO<Object> getIpFileList() {
- List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listFiles();
+ public ResponseVO<Object> getIpFileList(@RequestParam(required = false, value = "keyword") String keyword) {
+ List<IpVolumeFile> ipVolumeFiles = ipVolumeFileService.listFiles(keyword);
List<Map> mapList = new ArrayList<>();
Map map;
for (IpVolumeFile bean : ipVolumeFiles) {
--
Gitblit v1.9.3