|  |  | 
 |  |  | import com.alibaba.fastjson2.JSONArray; | 
 |  |  | import com.alibaba.fastjson2.JSONObject; | 
 |  |  | import com.alibaba.fastjson2.TypeReference; | 
 |  |  | import com.baomidou.dynamic.datasource.annotation.DS; | 
 |  |  | import com.genersoft.iot.vmp.conf.MediaConfig; | 
 |  |  | import com.genersoft.iot.vmp.conf.UserSetting; | 
 |  |  | import com.genersoft.iot.vmp.gb28181.bean.*; | 
 |  |  | 
 |  |  | import java.util.stream.Collectors; | 
 |  |  |  | 
 |  |  | @Service | 
 |  |  | @DS("master") | 
 |  |  | public class StreamPushServiceImpl implements IStreamPushService { | 
 |  |  |  | 
 |  |  |     private final static Logger logger = LoggerFactory.getLogger(StreamPushServiceImpl.class); | 
 |  |  | 
 |  |  |                     redisCatchStorage.sendStreamChangeMsg(type, jsonObject); | 
 |  |  |                     // 移除redis内流的信息 | 
 |  |  |                     redisCatchStorage.removeStream(mediaServerItem.getId(), "PUSH", offlineOnStreamChangedHookParam.getApp(), offlineOnStreamChangedHookParam.getStream()); | 
 |  |  |                     // 冗余数据,自己系统中自用 | 
 |  |  |                     redisCatchStorage.removePushListItem(offlineOnStreamChangedHookParam.getApp(), offlineOnStreamChangedHookParam.getStream(), mediaServerItem.getId()); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 jsonObject.put("register", false); | 
 |  |  |                 jsonObject.put("mediaServerId", mediaServerId); | 
 |  |  |                 redisCatchStorage.sendStreamChangeMsg(type, jsonObject); | 
 |  |  |  | 
 |  |  |                 // 冗余数据,自己系统中自用 | 
 |  |  |                 redisCatchStorage.removePushListItem(onStreamChangedHookParam.getApp(), onStreamChangedHookParam.getStream(), mediaServerId); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | 
 |  |  |  | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             if (streamPushItemListFroPlatform.size() > 0) { | 
 |  |  |             if (!streamPushItemListFroPlatform.isEmpty()) { | 
 |  |  |                 platformGbStreamMapper.batchAdd(streamPushItemListFroPlatform); | 
 |  |  |                 // 发送通知 | 
 |  |  |                 for (String platformId : platformForEvent.keySet()) { | 
 |  |  | 
 |  |  |  | 
 |  |  |         return new ResourceBaseInfo(total, online); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public Map<String, StreamPushItem> getAllAppAndStreamMap() { | 
 |  |  |         return streamPushMapper.getAllAppAndStreamMap(); | 
 |  |  |     } | 
 |  |  | } |