From 2b1f7a47394363e95deb4dfa0f1c67d41e747f7f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 01 二月 2023 10:56:40 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' into fix-269 --- src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java | 377 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 377 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java new file mode 100644 index 0000000..0b0a7d9 --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java @@ -0,0 +1,377 @@ +package com.genersoft.iot.vmp.storager; + +import com.genersoft.iot.vmp.gb28181.bean.*; +import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; +import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; +import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; +import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; +import com.github.pagehelper.PageInfo; + +import java.util.List; + +/** + * @description:瑙嗛璁惧鏁版嵁瀛樺偍鎺ュ彛 + * @author: swwheihei + * @date: 2020骞�5鏈�6鏃� 涓嬪崍2:14:31 + */ +@SuppressWarnings("rawtypes") +public interface IVideoManagerStorage { + + /** + * 鏍规嵁璁惧ID鍒ゆ柇璁惧鏄惁瀛樺湪 + * + * @param deviceId 璁惧ID + * @return true:瀛樺湪 false锛氫笉瀛樺湪 + */ + public boolean exists(String deviceId); + + /** + * 寮�濮嬫挱鏀� + * @param deviceId 璁惧id + * @param channelId 閫氶亾ID + * @param streamId 娴佸湴鍧� + */ + public void startPlay(String deviceId, String channelId, String streamId); + + /** + * 鍋滄鎾斁 + * @param deviceId 璁惧id + * @param channelId 閫氶亾ID + */ + public void stopPlay(String deviceId, String channelId); + + /** + * 鑾峰彇璁惧 + * + * @param deviceId 璁惧ID + * @return DShadow 璁惧瀵硅薄 + */ + public Device queryVideoDevice(String deviceId); + + /** + * 鑾峰彇鏌愪釜璁惧鐨勯�氶亾鍒楄〃 + * + * @param deviceId 璁惧ID + * @param page 鍒嗛〉 褰撳墠椤� + * @param count 姣忛〉鏁伴噺 + * @return + */ + public PageInfo queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, Boolean catalogUnderDevice, int page, int count); + + public List<DeviceChannel> queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit,List<String> channelIds); + + + /** + * 鑾峰彇鏌愪釜璁惧鐨勯�氶亾鍒楄〃 + * + * @param deviceId 璁惧ID + * @return + */ + public List<DeviceChannel> queryChannelsByDeviceId(String deviceId,Boolean online,List<String> channelIds); + public List<DeviceChannel> queryOnlineChannelsByDeviceId(String deviceId); + + /** + * 鑾峰彇鏌愪釜璁惧鐨勯�氶亾 + * @param deviceId 璁惧ID + * @param channelId 閫氶亾ID + */ + public DeviceChannel queryChannel(String deviceId, String channelId); + + /** + * 鍒犻櫎閫氶亾 + * @param deviceId 璁惧ID + * @param channelId 閫氶亾ID + */ + public int delChannel(String deviceId, String channelId); + + /** + * 鑾峰彇澶氫釜璁惧 + * @param page 褰撳墠椤垫暟 + * @param count 姣忛〉鏁伴噺 + * @return List<Device> 璁惧瀵硅薄鏁扮粍 + */ + public PageInfo<Device> queryVideoDeviceList(int page, int count,Boolean online); + + /** + * 鑾峰彇澶氫釜璁惧 + * + * @return List<Device> 璁惧瀵硅薄鏁扮粍 + */ + public List<Device> queryVideoDeviceList(Boolean online); + + + + /** + * 鏌ヨ瀛愯澶� + * + * @param deviceId + * @param channelId + * @param page + * @param count + * @return + */ + PageInfo querySubChannels(String deviceId, String channelId, String query, Boolean hasSubChannel, Boolean online, int page, int count); + + + /** + * 娓呯┖閫氶亾 + * @param deviceId + */ + void cleanChannelsForDevice(String deviceId); + + + /** + * 鏇存柊涓婄骇骞冲彴 + * @param parentPlatform + */ + boolean updateParentPlatform(ParentPlatform parentPlatform); + + + /** + * 娣诲姞涓婄骇骞冲彴 + * @param parentPlatform + */ + boolean addParentPlatform(ParentPlatform parentPlatform); + + /** + * 鍒犻櫎涓婄骇骞冲彴 + * @param parentPlatform + */ + boolean deleteParentPlatform(ParentPlatform parentPlatform); + + /** + * 鑾峰彇鎵�鏈夊凡鍚敤鐨勫钩鍙� + * @return + */ + List<ParentPlatform> queryEnableParentPlatformList(boolean enable); + + /** + * 鑾峰彇涓婄骇骞冲彴 + * @param platformGbId + * @return + */ + ParentPlatform queryParentPlatByServerGBId(String platformGbId); + + /** + * 鎵�鏈夊钩鍙扮绾� + */ + void outlineForAllParentPlatform(); + + /** + * 鏌ヨ閫氶亾淇℃伅锛屼笉鍖哄垎璁惧(宸插叧鑱斿钩鍙版垨鍏ㄩ儴) + */ + PageInfo<ChannelReduce> queryAllChannelList(int page, int count, String query, Boolean online, Boolean channelType, String platformId, String catalogId); + + /** + * 鏌ヨ璁惧鐨勯�氶亾淇℃伅 + */ + List<DeviceChannelInPlatform> queryChannelListInParentPlatform(String platformId); + + + + /** + * 绉婚櫎涓婄骇骞冲彴鐨勯�氶亾淇℃伅 + * @param platformId + * @param channelReduces + * @return + */ + int delChannelForGB(String platformId, List<ChannelReduce> channelReduces); + + + DeviceChannel queryChannelInParentPlatform(String platformId, String channelId); + + List<PlatformCatalog> queryChannelInParentPlatformAndCatalog(String platformId, String catalogId); + List<PlatformCatalog> queryStreamInParentPlatformAndCatalog(String platformId, String catalogId); + + Device queryVideoDeviceByPlatformIdAndChannelId(String platformId, String channelId); + + /** + * 閽堝deviceinfo鎸囦护鐨勬煡璇㈡帴鍙� + * @param platformId 骞冲彴id + * @param channelId 閫氶亾id + * @return 璁惧淇℃伅 + */ + Device queryDeviceInfoByPlatformIdAndChannelId(String platformId, String channelId); + /** + * 娣诲姞Mobile Position璁惧绉诲姩浣嶇疆 + * @param mobilePosition + * @return + */ + public boolean insertMobilePosition(MobilePosition mobilePosition); + + /** + * 鏌ヨ绉诲姩浣嶇疆杞ㄨ抗 + * @param deviceId + * @param startTime + * @param endTime + */ + public List<MobilePosition> queryMobilePositions(String deviceId, String channelId, String startTime, String endTime); + + /** + * 鏌ヨ鏈�鏂扮Щ鍔ㄤ綅缃� + * @param deviceId + */ + public MobilePosition queryLatestPosition(String deviceId); + + /** + * 鍒犻櫎鎸囧畾璁惧鐨勬墍鏈夌Щ鍔ㄤ綅缃� + * @param deviceId + */ + public int clearMobilePositionsByDeviceId(String deviceId); + + /** + * 绉婚櫎浠g悊娴� + * @param app + * @param stream + * @return + */ + public int deleteStreamProxy(String app, String stream); + + /** + * 鎸夌収鏄惁鍚敤鑾峰彇浠g悊娴� + * @param enable + * @return + */ + public List<StreamProxyItem> getStreamProxyListForEnable(boolean enable); + + /** + * 鎸夌収鏄痑pp鍜宻tream鑾峰彇浠g悊娴� + * @param app + * @param stream + * @return + */ + public StreamProxyItem queryStreamProxy(String app, String stream); + + /** + * 鑾峰彇浠g悊娴� + * @param page + * @param count + * @return + */ + PageInfo<StreamProxyItem> queryStreamProxyList(Integer page, Integer count); + + /** + * 鏍规嵁鍥芥爣ID鑾峰彇骞冲彴鍏宠仈鐨勭洿鎾祦 + * @param platformId + * @param channelId + * @return + */ + GbStream queryStreamInParentPlatform(String platformId, String channelId); + + /** + * 鑾峰彇骞冲彴鍏宠仈鐨勭洿鎾祦 + * @param platformId + * @return + */ + List<DeviceChannel> queryGbStreamListInPlatform(String platformId); + + /** + * 绉婚櫎鍗曚釜鎺ㄦ祦 + * @param app + * @param stream + */ + int removeMedia(String app, String stream); + + /** + * 璁剧疆娴佺绾� + */ + int mediaOffline(String app, String streamId); + + /** + * 璁剧疆娴佷笂绾� + */ + int mediaOnline(String app, String streamId); + + /** + * 璁剧疆骞冲彴鍦ㄧ嚎/绂荤嚎 + */ + void updateParentPlatformStatus(String platformGbID, boolean online); + + /** + * 鏍规嵁濯掍綋ID鑾峰彇鍚敤/涓嶅惎鐢ㄧ殑浠g悊鍒楄〃 + * @param id 濯掍綋ID + * @param enable 鍚敤/涓嶅惎鐢� + * @return + */ + List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean enable); + + /** + * 鏍规嵁閫氶亾ID鑾峰彇鍏舵墍鍦ㄨ澶� + * @param channelId 閫氶亾ID + * @return + */ + Device queryVideoDeviceByChannelId(String channelId); + + /** + * 閫氶亾涓婄嚎 + * @param channelId 閫氶亾ID + */ + void deviceChannelOnline(String deviceId, String channelId); + + /** + * 閫氶亾绂荤嚎 + * @param channelId 閫氶亾ID + */ + void deviceChannelOffline(String deviceId, String channelId); + + /** + * 閫氳繃app涓巗tream鑾峰彇StreamProxy + * @param app + * @param streamId + * @return + */ + StreamProxyItem getStreamProxyByAppAndStream(String app, String streamId); + + /** + * catlog鏌ヨ缁撴潫鍚庡畬鍏ㄩ噸鍐欓�氶亾淇℃伅 + * @param deviceId + * @param deviceChannelList + */ + boolean resetChannels(String deviceId, List<DeviceChannel> deviceChannelList); + + boolean updateChannels(String deviceId, List<DeviceChannel> deviceChannelList); + + /** + * 鑾峰彇鐩綍淇℃伅 + * @param platformId + * @param parentId + * @return + */ + List<PlatformCatalog> getChildrenCatalogByPlatform(String platformId, String parentId); + + int addCatalog(PlatformCatalog platformCatalog); + + PlatformCatalog getCatalog(String id); + + int delCatalog(String id); + + int updateCatalog(PlatformCatalog platformCatalog); + + int setDefaultCatalog(String platformId, String catalogId); + + List<DeviceChannel> queryCatalogInPlatform(String serverGBId); + + int delRelation(PlatformCatalog platformCatalog); + + int updateStreamGPS(List<GPSMsgInfo> gpsMsgInfo); + + List<ParentPlatform> queryPlatFormListForGBWithGBId(String channelId, List<String> platforms); + + List<ParentPlatform> queryPlatFormListForStreamWithGBId(String app, String stream, List<String> platforms); + + GbStream getGbStream(String app, String streamId); + + void delCatalogByPlatformId(String serverGBId); + + void delRelationByPlatformId(String serverGBId); + + PlatformCatalog queryDefaultCatalogInPlatform(String platformId); + + List<ChannelSourceInfo> getChannelSource(String platformId, String gbId); + + void updateChannelPosition(DeviceChannel deviceChannel); + + void cleanContentForPlatform(String serverGBId); + + List<DeviceChannel> queryChannelWithCatalog(String serverGBId); +} -- Gitblit v1.8.0