临时提交

pull/1733/head
648540858 2024-12-23 18:39:54 +08:00
parent 59e3175f00
commit f5ae9718d4
2 changed files with 4 additions and 19 deletions

View File

@ -250,12 +250,6 @@ public interface CommonGBChannelMapper {
"</script>"}) "</script>"})
void batchDelete(List<CommonGBChannel> channelListInDb); void batchDelete(List<CommonGBChannel> channelListInDb);
@SelectProvider(type = ChannelProvider.class, method = "queryByStreamPushId")
CommonGBChannel queryByStreamPushId(@Param("streamPushId") Integer streamPushId);
@SelectProvider(type = ChannelProvider.class, method = "queryByStreamProxyId")
CommonGBChannel queryByStreamProxyId(@Param("streamProxyId") Integer streamProxyId);
@SelectProvider(type = ChannelProvider.class, method = "queryListByCivilCode") @SelectProvider(type = ChannelProvider.class, method = "queryListByCivilCode")
List<CommonGBChannel> queryListByCivilCode(@Param("query") String query, @Param("online") Boolean online, List<CommonGBChannel> queryListByCivilCode(@Param("query") String query, @Param("online") Boolean online,
@Param("channelType") Integer channelType, @Param("civilCode") String civilCode); @Param("channelType") Integer channelType, @Param("civilCode") String civilCode);

View File

@ -13,8 +13,8 @@ public class ChannelProvider {
public final static String BASE_SQL = "select\n" + public final static String BASE_SQL = "select\n" +
" id as gb_id,\n" + " id as gb_id,\n" +
" device_db_id as gb_device_db_id,\n" + " device_db_id as gb_device_db_id,\n" +
" stream_push_id,\n" + " data_type,\n" +
" stream_proxy_id,\n" + " data_device_id,\n" +
" create_time,\n" + " create_time,\n" +
" update_time,\n" + " update_time,\n" +
" record_plan_id,\n" + " record_plan_id,\n" +
@ -60,7 +60,7 @@ public class ChannelProvider {
" wdc.id as gb_id,\n" + " wdc.id as gb_id,\n" +
" wdc.device_db_id as gb_device_db_id,\n" + " wdc.device_db_id as gb_device_db_id,\n" +
" wdc.stream_push_id,\n" + " wdc.stream_push_id,\n" +
" wdc.stream_proxy_id,\n" + " wdc.data_device_id,\n" +
" wdc.create_time,\n" + " wdc.create_time,\n" +
" wdc.update_time,\n" + " wdc.update_time,\n" +
" coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
@ -109,19 +109,10 @@ public class ChannelProvider {
return BASE_SQL + " where channel_type = 0 and id = #{gbId}"; return BASE_SQL + " where channel_type = 0 and id = #{gbId}";
} }
public String queryByStreamPushId(Map<String, Object> params ){
return BASE_SQL + " where channel_type = 0 and stream_push_id = #{streamPushId}";
}
public String queryByDataId(Map<String, Object> params ){ public String queryByDataId(Map<String, Object> params ){
return BASE_SQL + " where data_type = #{dataType} and data_device_id = #{dataDeviceId}"; return BASE_SQL + " where channel_type = 0 and data_type = #{dataType} and data_device_id = #{dataDeviceId}";
} }
public String queryByStreamProxyId(Map<String, Object> params ){
return BASE_SQL + " where channel_type = 0 and stream_proxy_id = #{streamProxyId}";
}
public String queryListByCivilCode(Map<String, Object> params ){ public String queryListByCivilCode(Map<String, Object> params ){
StringBuilder sqlBuild = new StringBuilder(); StringBuilder sqlBuild = new StringBuilder();
sqlBuild.append(BASE_SQL); sqlBuild.append(BASE_SQL);