From f02ad2926c2b5a2576e75c2cd6611862e9ec8cea Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 29 四月 2022 14:17:47 +0800
Subject: [PATCH] 摄像头

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
index 414ab56..b94de67 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/XiXunController.java
@@ -394,17 +394,18 @@
 
     /**
      * 鑾峰彇鎵ц涓殑瀹氭椂
+     *
      * @param
      * @return
      */
 
     @GetMapping("/getPushSchedule")
     public ResponseVO<Object> getPushSchedule(@RequestBody List<Long> ids) {
-        if(ids.isEmpty()){
+        if (ids.isEmpty()) {
             throw new BusinessException("鏈�夋嫨LED灞�");
         }
         List<LedScheduleVO> list = new ArrayList<>();
-        for(Long id : ids) {
+        for (Long id : ids) {
             LedScheduleVO ledScheduleVO = scheduleService.getledschedules(id);
             list.add(ledScheduleVO);
         }
@@ -417,7 +418,7 @@
      */
     @GetMapping("/closeWeatherPush/{id}")
     public ResponseVO<Object> closeWeatherPush(@PathVariable Long id) {
-        if(id==null){
+        if (id == null) {
             throw new BusinessException("鏈�夋嫨LED灞�");
         }
         SpringContextHolder.getBean(PoleService.class).closeXiXunAirPush(id);
@@ -428,13 +429,13 @@
      * 娓呭睆鎿嶄綔
      */
     @GetMapping("/clearScreen")
-    public ResponseVO<Object> clearScreen(@RequestBody List<String> codes) {
-
-        if(codes.isEmpty()){
+    public ResponseVO<Object> clearScreen(@RequestBody List<Long> ids) {
+        List<PoleLightemitEntity> list = poleLightemitService.listByIds(ids);
+        if (ids.isEmpty() && list.isEmpty()) {
             throw new BusinessException("鏈�夋嫨LED灞�");
         }
-        for(String playerId : codes) {
-            lightemitUtils.clear(playerId);
+        for (PoleLightemitEntity playerId : list) {
+            lightemitUtils.clear(playerId.getLightemitControlCode());
         }
         return ResponseUtil.success("娓呭睆鎴愬姛");
     }

--
Gitblit v1.9.3