mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 14:37:53 +08:00
修复翻页未重置页码的问题
This commit is contained in:
parent
c6a7e07a14
commit
51a7ae056e
@ -328,11 +328,26 @@ public interface GroupMapper {
|
|||||||
@Delete("DELETE FROM wvp_common_group where alias is not null")
|
@Delete("DELETE FROM wvp_common_group where alias is not null")
|
||||||
void deleteHasAlias();
|
void deleteHasAlias();
|
||||||
|
|
||||||
@Update(" UPDATE wvp_common_group g1" +
|
@Update(value = " UPDATE wvp_common_group g1" +
|
||||||
" JOIN wvp_common_group g2" +
|
" JOIN wvp_common_group g2" +
|
||||||
" ON g1.parent_device_id = g2.device_id" +
|
" ON g1.parent_device_id = g2.device_id" +
|
||||||
" SET g1.parent_id = g2.id" +
|
" SET g1.parent_id = g2.id" +
|
||||||
" WHERE g1.alias IS NOT NULL;")
|
" WHERE g1.alias IS NOT NULL;", databaseId = "mysql")
|
||||||
|
@Update(value = " UPDATE wvp_common_group g1" +
|
||||||
|
" JOIN wvp_common_group g2" +
|
||||||
|
" ON g1.parent_device_id = g2.device_id" +
|
||||||
|
" SET g1.parent_id = g2.id" +
|
||||||
|
" WHERE g1.alias IS NOT NULL;", databaseId = "h2")
|
||||||
|
@Update(value = " UPDATE wvp_common_group AS g1" +
|
||||||
|
" SET parent_id = g2.id" +
|
||||||
|
" FROM wvp_common_group AS g2" +
|
||||||
|
" WHERE g1.parent_device_id = g2.device_id" +
|
||||||
|
" AND g1.alias IS NOT NULL;", databaseId = "kingbase")
|
||||||
|
@Update(value = " UPDATE wvp_common_group AS g1" +
|
||||||
|
" SET parent_id = g2.id" +
|
||||||
|
" FROM wvp_common_group AS g2" +
|
||||||
|
" WHERE g1.parent_device_id = g2.device_id" +
|
||||||
|
" AND g1.alias IS NOT NULL;", databaseId = "postgresql")
|
||||||
void fixParentId();
|
void fixParentId();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.genersoft.iot.vmp.gb28181.service.impl;
|
package com.genersoft.iot.vmp.gb28181.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||||
import com.genersoft.iot.vmp.gb28181.dao.CommonGBChannelMapper;
|
import com.genersoft.iot.vmp.gb28181.dao.CommonGBChannelMapper;
|
||||||
@ -322,7 +321,6 @@ public class GroupServiceImpl implements IGroupService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveByAlias(Collection<Group> groups) {
|
public void saveByAlias(Collection<Group> groups) {
|
||||||
log.info("[存储分组数据] {}", JSONObject.toJSONString(groups));
|
|
||||||
// 清空别名数据
|
// 清空别名数据
|
||||||
groupManager.deleteHasAlias();
|
groupManager.deleteHasAlias();
|
||||||
// 写入新数据
|
// 写入新数据
|
||||||
|
|||||||
@ -671,13 +671,13 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean stopSendRtp(MediaServer mediaInfo, String app, String stream, String ssrc) {
|
public boolean stopSendRtp(MediaServer mediaServer, String app, String stream, String ssrc) {
|
||||||
IMediaNodeServerService mediaNodeServerService = nodeServerServiceMap.get(mediaInfo.getType());
|
IMediaNodeServerService mediaNodeServerService = nodeServerServiceMap.get(mediaServer.getType());
|
||||||
if (mediaNodeServerService == null) {
|
if (mediaNodeServerService == null) {
|
||||||
log.info("[stopSendRtp] 失败, mediaServer的类型: {},未找到对应的实现类", mediaInfo.getType());
|
log.info("[stopSendRtp] 失败, mediaServer的类型: {},未找到对应的实现类", mediaServer.getType());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return mediaNodeServerService.stopSendRtp(mediaInfo, app, stream, ssrc);
|
return mediaNodeServerService.stopSendRtp(mediaServer, app, stream, ssrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class MobilePositionServiceImpl implements IMobilePositionService {
|
|||||||
if (userSetting.getSavePositionHistory()) {
|
if (userSetting.getSavePositionHistory()) {
|
||||||
mobilePositionMapper.batchadd(mobilePositions);
|
mobilePositionMapper.batchadd(mobilePositions);
|
||||||
}
|
}
|
||||||
log.info("[移动位置订阅]更新通道位置: {}", mobilePositions.size());
|
log.debug("[移动位置订阅]更新通道位置: {}", mobilePositions.size());
|
||||||
Map<String, Map<Integer, DeviceChannel>> updateChannelMap = new HashMap<>();
|
Map<String, Map<Integer, DeviceChannel>> updateChannelMap = new HashMap<>();
|
||||||
for (MobilePosition mobilePosition : mobilePositions) {
|
for (MobilePosition mobilePosition : mobilePositions) {
|
||||||
DeviceChannel deviceChannel = new DeviceChannel();
|
DeviceChannel deviceChannel = new DeviceChannel();
|
||||||
|
|||||||
@ -70,7 +70,7 @@ public class RedisGpsMsgListener implements MessageListener {
|
|||||||
GPSMsgInfo gpsMsgInfo = JSON.parseObject(msg.getBody(), GPSMsgInfo.class);
|
GPSMsgInfo gpsMsgInfo = JSON.parseObject(msg.getBody(), GPSMsgInfo.class);
|
||||||
gpsMsgInfo.setStored(false);
|
gpsMsgInfo.setStored(false);
|
||||||
gpsMsgInfo.setTime(DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(gpsMsgInfo.getTime()));
|
gpsMsgInfo.setTime(DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(gpsMsgInfo.getTime()));
|
||||||
log.info("[REDIS的位置变化通知], {}", JSON.toJSONString(gpsMsgInfo));
|
log.debug("[REDIS的位置变化通知], {}", JSON.toJSONString(gpsMsgInfo));
|
||||||
// 只是放入redis缓存起来
|
// 只是放入redis缓存起来
|
||||||
redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo);
|
redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.genersoft.iot.vmp.service.redisMsg;
|
package com.genersoft.iot.vmp.service.redisMsg;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||||
@ -10,7 +11,6 @@ import com.genersoft.iot.vmp.gb28181.bean.RedisGroupMessage;
|
|||||||
import com.genersoft.iot.vmp.gb28181.service.IGroupService;
|
import com.genersoft.iot.vmp.gb28181.service.IGroupService;
|
||||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -35,10 +35,10 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||||||
@Component
|
@Component
|
||||||
public class RedisGroupMsgListener implements MessageListener {
|
public class RedisGroupMsgListener implements MessageListener {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IGroupService groupService;
|
private IGroupService groupService;
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private IRedisCatchStorage redisCatchStorage;
|
private IRedisCatchStorage redisCatchStorage;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -109,48 +109,49 @@ public class RedisGroupMsgListener implements MessageListener {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Group topGroup = aliasGroupMap.get(groupMessage.getTopGroupGAlias());
|
Group topGroup = aliasGroupMap.get(groupMessage.getTopGroupGAlias());
|
||||||
if (topGroup == null) {
|
if (topGroup == null) {
|
||||||
topGroup = aliasGroupToSave.get(groupMessage.getTopGroupGAlias());
|
topGroup = aliasGroupToSave.get(groupMessage.getTopGroupGAlias());
|
||||||
|
}
|
||||||
|
if (topGroup == null) {
|
||||||
|
log.info("[REDIS消息-业务分组同步回复] 业务分组信息未发送或者未首先发送, {}", groupMessage.toString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
group.setBusinessGroup(topGroup.getDeviceId());
|
||||||
|
if (groupMessage.getParentGAlias() != null) {
|
||||||
|
Group parentGroup = aliasGroupMap.get(groupMessage.getParentGAlias());
|
||||||
|
if (parentGroup == null) {
|
||||||
|
parentGroup = aliasGroupToSave.get(groupMessage.getParentGAlias());
|
||||||
}
|
}
|
||||||
if (topGroup == null) {
|
if (parentGroup == null) {
|
||||||
log.info("[REDIS消息-业务分组同步回复] 业务分组信息未发送或者未首先发送, {}", groupMessage.toString());
|
log.info("[REDIS消息-业务分组同步回复] 虚拟组织父节点未发送或者未首先发送, {}", groupMessage.toString());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
group.setBusinessGroup(topGroup.getDeviceId());
|
group.setParentId(null);
|
||||||
if (groupMessage.getParentGAlias() != null) {
|
group.setParentDeviceId(parentGroup.getDeviceId());
|
||||||
Group parentGroup = aliasGroupMap.get(groupMessage.getParentGAlias());
|
|
||||||
if (parentGroup == null) {
|
|
||||||
parentGroup = aliasGroupToSave.get(groupMessage.getParentGAlias());
|
|
||||||
}
|
|
||||||
if (parentGroup == null) {
|
|
||||||
log.info("[REDIS消息-业务分组同步回复] 虚拟组织父节点未发送或者未首先发送, {}", groupMessage.toString());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
group.setParentId(null);
|
|
||||||
group.setParentDeviceId(parentGroup.getDeviceId());
|
|
||||||
} else {
|
|
||||||
group.setParentId(null);
|
|
||||||
group.setParentDeviceId(topGroup.getDeviceId());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
group.setParentId(null);
|
group.setParentId(null);
|
||||||
group.setBusinessGroup(group.getDeviceId());
|
group.setParentDeviceId(topGroup.getDeviceId());
|
||||||
group.setParentDeviceId(null);
|
|
||||||
}
|
}
|
||||||
group.setUpdateTime(DateUtil.getNow());
|
} else {
|
||||||
aliasGroupToSave.put(group.getAlias(), group);
|
group.setParentId(null);
|
||||||
|
group.setBusinessGroup(group.getDeviceId());
|
||||||
|
group.setParentDeviceId(null);
|
||||||
}
|
}
|
||||||
// 存储分组数据
|
group.setUpdateTime(DateUtil.getNow());
|
||||||
groupService.saveByAlias(aliasGroupToSave.values());
|
aliasGroupToSave.put(group.getAlias(), group);
|
||||||
|
|
||||||
} catch (ControllerException e) {
|
|
||||||
log.warn("[REDIS消息-业务分组同步回复] 失败, \r\n{}", e.getMsg());
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.warn("[REDIS消息-业务分组同步回复] 发现未处理的异常, \r\n{}", new String(msg.getBody()));
|
|
||||||
log.error("[REDIS消息-业务分组同步回复] 异常内容: ", e);
|
|
||||||
}
|
}
|
||||||
|
log.info("[业务分组同步回复-存储分组数据] {}", JSONObject.toJSONString(aliasGroupToSave.values()));
|
||||||
|
// 存储分组数据
|
||||||
|
groupService.saveByAlias(aliasGroupToSave.values());
|
||||||
|
|
||||||
|
} catch (ControllerException e) {
|
||||||
|
log.warn("[REDIS消息-业务分组同步回复] 失败, \r\n{}", e.getMsg());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("[REDIS消息-业务分组同步回复] 发现未处理的异常, \r\n{}", new String(msg.getBody()));
|
||||||
|
log.error("[REDIS消息-业务分组同步回复] 异常内容: ", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +174,7 @@ public class RedisGroupMsgListener implements MessageListener {
|
|||||||
if (isTop) {
|
if (isTop) {
|
||||||
codeType = "215";
|
codeType = "215";
|
||||||
}
|
}
|
||||||
return String.format(deviceTemplate, codeType, RandomStringUtils.secureStrong().next(6, false, true));
|
return String.format(deviceTemplate, codeType, RandomStringUtils.insecure().next(6, false, true));
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
log.error("[REDIS消息-业务分组同步回复] 构建新的分组编号失败", e);
|
log.error("[REDIS消息-业务分组同步回复] 构建新的分组编号失败", e);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -157,4 +157,9 @@ public interface StreamPushMapper {
|
|||||||
"</foreach>" +
|
"</foreach>" +
|
||||||
"</script>"})
|
"</script>"})
|
||||||
int batchUpdate(List<StreamPush> streamPushItemForUpdate);
|
int batchUpdate(List<StreamPush> streamPushItemForUpdate);
|
||||||
|
|
||||||
|
@Delete(" DELETE FROM wvp_stream_push st " +
|
||||||
|
" LEFT join wvp_device_channel wdc on wdc.data_type = 2 and st.id = wdc.data_device_id " +
|
||||||
|
" where wdc.id is null and st.server_id = #{id}")
|
||||||
|
void deleteWithoutGBId(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -287,6 +287,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
}
|
}
|
||||||
if (mediaServer != null) {
|
if (mediaServer != null) {
|
||||||
mediaServerService.closeStreams(mediaServer, streamPush.getApp(), streamPush.getStream());
|
mediaServerService.closeStreams(mediaServer, streamPush.getApp(), streamPush.getStream());
|
||||||
|
mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);
|
||||||
}
|
}
|
||||||
streamPush.setPushing(false);
|
streamPush.setPushing(false);
|
||||||
if (userSetting.getUsePushingAsStatus()) {
|
if (userSetting.getUsePushingAsStatus()) {
|
||||||
@ -296,7 +297,6 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendRtpServerService.deleteByStream(streamPush.getStream());
|
sendRtpServerService.deleteByStream(streamPush.getStream());
|
||||||
mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);
|
|
||||||
streamPush.setUpdateTime(DateUtil.getNow());
|
streamPush.setUpdateTime(DateUtil.getNow());
|
||||||
streamPushMapper.update(streamPush);
|
streamPushMapper.update(streamPush);
|
||||||
return true;
|
return true;
|
||||||
@ -383,6 +383,12 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
redisCatchStorage.removePushListItem(mediaInfo.getApp(), mediaInfo.getStream(), mediaServer.getId());
|
redisCatchStorage.removePushListItem(mediaInfo.getApp(), mediaInfo.getStream(), mediaServer.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!pushItemMap.isEmpty()) {
|
||||||
|
for (StreamPush streamPush : pushItemMap.values()) {
|
||||||
|
// 如果没有国标编号,从数据库中删除
|
||||||
|
delete(streamPush.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Collection<StreamAuthorityInfo> streamAuthorityInfos = streamAuthorityInfoInfoMap.values();
|
Collection<StreamAuthorityInfo> streamAuthorityInfos = streamAuthorityInfoInfoMap.values();
|
||||||
if (!streamAuthorityInfos.isEmpty()) {
|
if (!streamAuthorityInfos.isEmpty()) {
|
||||||
@ -402,11 +408,8 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||||||
stop(streamPushItem);
|
stop(streamPushItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// // 移除没有GBId的推流
|
// 移除没有GBId的推流
|
||||||
// streamPushMapper.deleteWithoutGBId(mediaServerId);
|
streamPushMapper.deleteWithoutGBId(mediaServer.getId());
|
||||||
// // 其他的流设置未启用
|
|
||||||
// streamPushMapper.updateStatusByMediaServerId(mediaServerId, false);
|
|
||||||
// streamProxyMapper.updateStatusByMediaServerId(mediaServerId, false);
|
|
||||||
// 发送流停止消息
|
// 发送流停止消息
|
||||||
String type = "PUSH";
|
String type = "PUSH";
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
|
|||||||
@ -626,5 +626,11 @@ public class CameraChannelController {
|
|||||||
return channelService.queryMeetingChannelList(topGroupAlias);
|
return channelService.queryMeetingChannelList(topGroupAlias);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/test")
|
||||||
|
@ResponseBody
|
||||||
|
public SYMember test(String device){
|
||||||
|
return channelService.getMember(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import lombok.Setter;
|
|||||||
public class SYMember {
|
public class SYMember {
|
||||||
|
|
||||||
private String no;
|
private String no;
|
||||||
private String unicodeNo;
|
private Long unicodeNo;
|
||||||
private String blockId;
|
private Long blockId;
|
||||||
private String unitNo;
|
private String unitNo;
|
||||||
private String terminalMemberStatus;
|
private String terminalMemberStatus;
|
||||||
|
|
||||||
|
|||||||
@ -232,7 +232,7 @@ public class CameraChannelService implements CommandLineRunner {
|
|||||||
jsonObject.put("type", ChannelEvent.ChannelEventMessageType.DEL);
|
jsonObject.put("type", ChannelEvent.ChannelEventMessageType.DEL);
|
||||||
jsonObject.put("list", resultListForDelete);
|
jsonObject.put("list", resultListForDelete);
|
||||||
log.info("[SY-redis发送通知-DEL] 发送 通道信息变化 {}: {}", REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
log.info("[SY-redis发送通知-DEL] 发送 通道信息变化 {}: {}", REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
||||||
redisTemplate.convertAndSend(REDIS_CHANNEL_MESSAGE, jsonObject);
|
redisTemplateForString.convertAndSend(REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
||||||
}
|
}
|
||||||
if (!resultListForAdd.isEmpty()) {
|
if (!resultListForAdd.isEmpty()) {
|
||||||
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ADD);
|
sendChannelMessage(resultListForAdd, ChannelEvent.ChannelEventMessageType.ADD);
|
||||||
@ -272,7 +272,7 @@ public class CameraChannelService implements CommandLineRunner {
|
|||||||
private void sendMemberStatusMessage(List<SYMember> memberList) {
|
private void sendMemberStatusMessage(List<SYMember> memberList) {
|
||||||
String jsonString = JSONObject.toJSONString(memberList);
|
String jsonString = JSONObject.toJSONString(memberList);
|
||||||
log.info("[SY-redis发送通知] 发送 状态变化 {}: {}", REDIS_MEMBER_STATUS_MESSAGE, jsonString);
|
log.info("[SY-redis发送通知] 发送 状态变化 {}: {}", REDIS_MEMBER_STATUS_MESSAGE, jsonString);
|
||||||
redisTemplate.convertAndSend(REDIS_MEMBER_STATUS_MESSAGE, jsonString);
|
redisTemplateForString.convertAndSend(REDIS_MEMBER_STATUS_MESSAGE, jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendChannelMessage(List<CommonGBChannel> channelList, ChannelEvent.ChannelEventMessageType type) {
|
private void sendChannelMessage(List<CommonGBChannel> channelList, ChannelEvent.ChannelEventMessageType type) {
|
||||||
@ -284,7 +284,7 @@ public class CameraChannelService implements CommandLineRunner {
|
|||||||
jsonObject.put("type", type);
|
jsonObject.put("type", type);
|
||||||
jsonObject.put("list", cameraChannelList);
|
jsonObject.put("list", cameraChannelList);
|
||||||
log.info("[SY-redis发送通知-{}] 发送 通道信息变化 {}: {}", type, REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
log.info("[SY-redis发送通知-{}] 发送 通道信息变化 {}: {}", type, REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
||||||
redisTemplate.convertAndSend(REDIS_CHANNEL_MESSAGE, jsonObject);
|
redisTemplateForString.convertAndSend(REDIS_CHANNEL_MESSAGE, jsonObject.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听GPS消息,如果是移动设备则发送redis消息
|
// 监听GPS消息,如果是移动设备则发送redis消息
|
||||||
@ -312,17 +312,17 @@ public class CameraChannelService implements CommandLineRunner {
|
|||||||
jsonObject.put("speed", mobilePosition.getSpeed());
|
jsonObject.put("speed", mobilePosition.getSpeed());
|
||||||
jsonObject.put("blockId", member.getBlockId());
|
jsonObject.put("blockId", member.getBlockId());
|
||||||
log.info("[SY-redis发送通知-移动设备位置信息] 发送 {}: {}", REDIS_GPS_MESSAGE, jsonObject.toString());
|
log.info("[SY-redis发送通知-移动设备位置信息] 发送 {}: {}", REDIS_GPS_MESSAGE, jsonObject.toString());
|
||||||
redisTemplate.convertAndSend(REDIS_GPS_MESSAGE, jsonObject);
|
redisTemplateForString.convertAndSend(REDIS_GPS_MESSAGE, jsonObject.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private SYMember getMember(String deviceId) {
|
public SYMember getMember(String deviceId) {
|
||||||
// 从redis补充信息
|
// 从redis补充信息
|
||||||
String key = MOBILE_CHANNEL_PREFIX + deviceId;
|
String key = MOBILE_CHANNEL_PREFIX + deviceId;
|
||||||
String memberJsonString = (String) redisTemplate.opsForValue().get(key);
|
JSONObject jsonObject = (JSONObject)redisTemplate.opsForValue().get(key);
|
||||||
if (memberJsonString == null) {
|
if (jsonObject == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return JSONObject.parseObject(memberJsonString, SYMember.class);
|
return JSONObject.parseObject(jsonObject.toString(), SYMember.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData()
|
this.initData()
|
||||||
this.updateLooper = setInterval(this.initData, 10000)
|
this.updateLooper = setInterval(this.getList, 10000)
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.$destroy('videojs')
|
this.$destroy('videojs')
|
||||||
@ -216,6 +216,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData: function() {
|
initData: function() {
|
||||||
|
this.currentPage = 1
|
||||||
|
this.total = 0
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
currentChange: function(val) {
|
currentChange: function(val) {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
placeholder="关键字"
|
placeholder="关键字"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
clearable
|
clearable
|
||||||
@input="getPlatformList"
|
@input="queryList"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -292,6 +292,11 @@ export default {
|
|||||||
this.count = val
|
this.count = val
|
||||||
this.getPlatformList()
|
this.getPlatformList()
|
||||||
},
|
},
|
||||||
|
queryList: function() {
|
||||||
|
this.currentPage = 1
|
||||||
|
this.total = 0
|
||||||
|
this.getPlatformList()
|
||||||
|
},
|
||||||
getPlatformList: function() {
|
getPlatformList: function() {
|
||||||
this.$store.dispatch('platform/query', {
|
this.$store.dispatch('platform/query', {
|
||||||
count: this.count,
|
count: this.count,
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
placeholder="关键字"
|
placeholder="关键字"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
clearable
|
clearable
|
||||||
@input="getStreamProxyList"
|
@input="queryList"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流媒体">
|
<el-form-item label="流媒体">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
style="margin-right: 1rem;"
|
style="margin-right: 1rem;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
default-first-option
|
default-first-option
|
||||||
@change="getStreamProxyList"
|
@change="queryList"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option
|
<el-option
|
||||||
@ -35,7 +35,7 @@
|
|||||||
style="margin-right: 1rem;"
|
style="margin-right: 1rem;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
default-first-option
|
default-first-option
|
||||||
@change="getStreamProxyList"
|
@change="queryList"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option label="正在拉流" value="true" />
|
<el-option label="正在拉流" value="true" />
|
||||||
@ -189,6 +189,11 @@ export default {
|
|||||||
this.count = val
|
this.count = val
|
||||||
this.getStreamProxyList()
|
this.getStreamProxyList()
|
||||||
},
|
},
|
||||||
|
queryList: function() {
|
||||||
|
this.currentPage = 1
|
||||||
|
this.total = 0
|
||||||
|
this.getStreamProxyList()
|
||||||
|
},
|
||||||
getStreamProxyList: function() {
|
getStreamProxyList: function() {
|
||||||
this.$store.dispatch('streamProxy/queryList', {
|
this.$store.dispatch('streamProxy/queryList', {
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
placeholder="关键字"
|
placeholder="关键字"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
clearable
|
clearable
|
||||||
@input="getPushList"
|
@input="queryList"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流媒体">
|
<el-form-item label="流媒体">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
style="margin-right: 1rem;"
|
style="margin-right: 1rem;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
default-first-option
|
default-first-option
|
||||||
@change="getPushList"
|
@change="queryList"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option
|
<el-option
|
||||||
@ -35,7 +35,7 @@
|
|||||||
style="margin-right: 1rem;"
|
style="margin-right: 1rem;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
default-first-option
|
default-first-option
|
||||||
@change="getPushList"
|
@change="queryList"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option label="推流中" value="true" />
|
<el-option label="推流中" value="true" />
|
||||||
@ -206,6 +206,11 @@ export default {
|
|||||||
this.count = val
|
this.count = val
|
||||||
this.getPushList()
|
this.getPushList()
|
||||||
},
|
},
|
||||||
|
queryList: function() {
|
||||||
|
this.currentPage = 1
|
||||||
|
this.total = 0
|
||||||
|
this.getPushList()
|
||||||
|
},
|
||||||
getPushList: function() {
|
getPushList: function() {
|
||||||
this.$store.dispatch('streamPush/queryList', {
|
this.$store.dispatch('streamPush/queryList', {
|
||||||
page: this.currentPage,
|
page: this.currentPage,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user