临时提交
This commit is contained in:
@@ -188,4 +188,44 @@ public interface GroupMapper {
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbBusinessGroupId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryBusinessGroupInChannelList(List<CommonGBChannel> channelList);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT " +
|
||||
" wcg.device_id as gb_device_id," +
|
||||
" wcg.name as gb_name," +
|
||||
" wcg.business_group as gb_business_group," +
|
||||
" 1 as gb_parental," +
|
||||
" wcg.parent_device_id as gb_parent_id" +
|
||||
" from wvp_common_group wcg" +
|
||||
" left join wvp_platform_group wpg on wpg.group_id = wcg.id" +
|
||||
" where wpg.platform_id = #{platformId} " +
|
||||
" </script>")
|
||||
List<CommonGBChannel> queryForPlatform(@Param("platformId") Integer platformId);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT * " +
|
||||
" from wvp_common_group wcg" +
|
||||
" left join wvp_platform_group wpg on wpg.group_id = wcg.id and wpg.platform_id = #{platformId}" +
|
||||
" where wpg.platform_id = null and wcg.device_id in " +
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbParentId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryNotShareForPlatformByChannelList(List<CommonGBChannel> channelList, @Param("platformId") Integer platformId);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT * " +
|
||||
" from wvp_common_group wcg" +
|
||||
" left join wvp_platform_group wpg on wpg.group_id = wcg.id and wpg.platform_id = #{platformId}" +
|
||||
" where wpg.platform_id = null and wcg.id in " +
|
||||
" <foreach collection='allGroup' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryNotShareForPlatformByGroupList(Set<Group> allGroup, @Param("platformId") Integer platformId);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT " +
|
||||
" * " +
|
||||
" from wvp_common_group " +
|
||||
" where device_id in " +
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbParentId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryByChannelList(List<CommonGBChannel> channelList);
|
||||
}
|
||||
|
||||
@@ -343,4 +343,22 @@ public interface PlatformChannelMapper {
|
||||
"</script>")
|
||||
int removeChannels(@Param("platformId") Integer platformId, List<CommonGBChannel> channelList);
|
||||
|
||||
@Insert("<script> "+
|
||||
"INSERT INTO wvp_platform_group (platform_id, group_id) VALUES" +
|
||||
"<foreach collection='groupListNotShare' item='item' separator=','>" +
|
||||
" (#{platformId}, #{item.id} )" +
|
||||
"</foreach>" +
|
||||
"</script>")
|
||||
int addPlatformGroup(List<Group> groupListNotShare, @Param("platformId") Integer platformId);
|
||||
|
||||
@Delete("<script> "+
|
||||
"DELETE from wvp_platform_group WHERE platform_id=#{platformId} AND group_id in" +
|
||||
"<foreach collection='groupList' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
|
||||
"</script>")
|
||||
int removePlatformGroup(List<Group> groupList, @Param("platformId") Integer platformId);
|
||||
|
||||
@Delete("<script> "+
|
||||
"DELETE from wvp_platform_group WHERE platform_id=#{platformId} AND group_id =#{id}" +
|
||||
"</script>")
|
||||
void removePlatformGroupById(@Param("id") int id, @Param("platformId") Integer platformId);
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ public interface PlatformMapper {
|
||||
|
||||
@Insert("INSERT INTO wvp_platform (enable, name, server_gb_id, server_gb_domain, server_ip, server_port,device_gb_id,device_ip,"+
|
||||
" device_port,username,password,expires,keep_timeout,transport,character_set,ptz,rtcp,status,catalog_group, update_time," +
|
||||
" create_time, as_message_channel, send_stream_ip, auto_push_channel, catalog_with_platform,catalog_with_group,catalog_with_region, "+
|
||||
" create_time, as_message_channel, send_stream_ip, auto_push_channel, catalog_with_platform, custom_group, custom_civil_code, "+
|
||||
" civil_code,manufacturer,model,address,register_way,secrecy) " +
|
||||
" VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIp}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
|
||||
" #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, #{status}, #{catalogGroup},#{updateTime}," +
|
||||
" #{createTime}, #{asMessageChannel}, #{sendStreamIp}, #{autoPushChannel}, #{catalogWithPlatform}, #{catalogWithGroup},#{catalogWithRegion}, " +
|
||||
" #{createTime}, #{asMessageChannel}, #{sendStreamIp}, #{autoPushChannel}, #{catalogWithPlatform}, #{customGroup},#{customCivilCode}, " +
|
||||
" #{civilCode}, #{manufacturer}, #{model}, #{address}, #{registerWay}, #{secrecy})")
|
||||
int add(Platform parentPlatform);
|
||||
|
||||
@@ -48,8 +48,8 @@ public interface PlatformMapper {
|
||||
" send_stream_ip=#{sendStreamIp}, " +
|
||||
" auto_push_channel=#{autoPushChannel}, " +
|
||||
" catalog_with_platform=#{catalogWithPlatform}, " +
|
||||
" catalog_with_group=#{catalogWithGroup}, " +
|
||||
" catalog_with_region=#{catalogWithRegion}, " +
|
||||
" custom_group=#{customGroup}, " +
|
||||
" custom_civil_code=#{customCivilCode}, " +
|
||||
" civil_code=#{civilCode}, " +
|
||||
" manufacturer=#{manufacturer}, " +
|
||||
" model=#{model}, " +
|
||||
|
||||
@@ -116,4 +116,15 @@ public interface RegionMapper {
|
||||
" <foreach collection='regionChannelList' item='item' open='(' separator=',' close=')' > #{item.parentDeviceId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Region> queryParentInChannelList(Set<Region> regionChannelList);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT " +
|
||||
" wcr.device_id as gb_device_id," +
|
||||
" wcr.name as gb_name" +
|
||||
" from wvp_common_region wcr" +
|
||||
" left join wvp_platform_region wpr on wcr.id = wpr.region_id" +
|
||||
" where wpr.platform_id = #{platformId} " +
|
||||
" </script>")
|
||||
List<CommonGBChannel> queryByPlatform(@Param("platformId") Integer platformId);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user