修复REDIS更新推流设备状态
This commit is contained in:
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.provider.ChannelProvider;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -571,4 +572,7 @@ public interface CommonGBChannelMapper {
|
||||
" </script>"})
|
||||
int updateCivilCodeByChannelList(@Param("civilCode") String civilCode, List<CommonGBChannel> channelList);
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryListByStreamPushList")
|
||||
List<CommonGBChannel> queryListByStreamPushList(List<StreamPush> streamPushList);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.dao.provider;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Group;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -240,4 +241,23 @@ public class ChannelProvider {
|
||||
|
||||
return sqlBuild.toString() ;
|
||||
}
|
||||
|
||||
public String queryListByStreamPushList(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(getBaseSelectSql());
|
||||
|
||||
sqlBuild.append(" where channel_type = 0 and stream_push_id in ( ");
|
||||
Collection<StreamPush> ids = (Collection<StreamPush>)params.get("streamPushList");
|
||||
boolean first = true;
|
||||
for (StreamPush streamPush : ids) {
|
||||
if (!first) {
|
||||
sqlBuild.append(",");
|
||||
}
|
||||
sqlBuild.append(streamPush.getId());
|
||||
first = false;
|
||||
}
|
||||
sqlBuild.append(" )");
|
||||
|
||||
return sqlBuild.toString() ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user