Преглед изворни кода

2023-10-19 当信标有变动的时候,需要移除通知的这个信标。

chaiyunlong пре 2 година
родитељ
комит
67f8f20ea8

+ 2 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/socket/service/impl/BeaconMateImpl.java

@@ -105,10 +105,10 @@ public class BeaconMateImpl implements BeaconMate {
                             }
                         }
                     }
-                    //判断通知消息集合有数据,说明信标有变动,需要重新变更加通知
-                    redisService.setCacheObject(BaseConstants.BEACON_MATE_NOTICE+"~"+ subId,newNoticeList, 30L, TimeUnit.MINUTES);
                     //下发通知,告诉前端页面,查询redis获取相关信息
                     if(beaconNoticeList!=null && beaconNoticeList.size()!=newNoticeList.size()){
+                        //判断通知消息集合有数据,说明信标有变动,需要重新变更加通知
+                        redisService.setCacheObject(BaseConstants.BEACON_MATE_NOTICE+"~"+ subId,newNoticeList, 30L, TimeUnit.MINUTES);
                         messageSendService.bluetoothGatewayToMac(subId);
                     }
                 }