Merge branch 'master' into dev/数据库统合

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceMapper.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelPlayServiceImpl.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformChannelServiceImpl.java
This commit is contained in:
648540858
2024-12-27 10:57:42 +08:00
47 changed files with 473 additions and 392 deletions

View File

@@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.streamProxy.bean;
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -72,7 +73,8 @@ public class StreamProxy extends CommonGBChannel {
if (ObjectUtils.isEmpty(this.getGbName())) {
this.setGbName( app+ "-" +stream);
}
this.setStreamProxyId(this.getId());
this.setDataType(ChannelDataType.STREAM_PROXY.value);
this.setDataDeviceId(this.getId());
return this;
}
}

View File

@@ -1,5 +1,7 @@
package com.genersoft.iot.vmp.streamProxy.dao.provider;
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
import java.util.Map;
public class StreamProxyProvider {
@@ -7,12 +9,13 @@ public class StreamProxyProvider {
public String getBaseSelectSql(){
return "SELECT " +
" st.*, " +
" st.id as stream_proxy_id, " +
ChannelDataType.STREAM_PROXY.value + " as data_type, " +
" st.id as data_device_id, " +
" wdc.*, " +
" wdc.id as gb_id" +
" FROM wvp_stream_proxy st " +
" LEFT join wvp_device_channel wdc " +
" on st.id = wdc.stream_proxy_id ";
" on wdc.data_type = 3 and st.id = wdc.data_device_id ";
}
public String select(Map<String, Object> params ){
@@ -20,7 +23,7 @@ public class StreamProxyProvider {
}
public String selectForPushingInMediaServer(Map<String, Object> params ){
return getBaseSelectSql() + " WHERE st.pulling=1 and st.media_server_id=#{mediaServerId} order by st.create_time desc";
return getBaseSelectSql() + " WHERE st.pulling=true and st.media_server_id=#{mediaServerId} order by st.create_time desc";
}
public String selectOneByAppAndStream(Map<String, Object> params ){

View File

@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.streamProxy.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
@@ -177,7 +178,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
streamProxy.setCreateTime(DateUtil.getNow());
streamProxy.setUpdateTime(DateUtil.getNow());
streamProxyMapper.add(streamProxy);
streamProxy.setStreamProxyId(streamProxy.getId());
streamProxy.setDataType(ChannelDataType.STREAM_PROXY.value);
streamProxy.setDataDeviceId(streamProxy.getId());
}
@Override