mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 23:17:50 +08:00
Compare commits
4 Commits
3b3447c7e1
...
1b3ed3348b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b3ed3348b | ||
|
|
bc545f12a5 | ||
|
|
6a6071973c | ||
|
|
60e9fb3daa |
@ -506,7 +506,11 @@ public class DeviceServiceImpl implements IDeviceService, CommandLineRunner {
|
|||||||
if (device == null || device.getSubscribeCycleForCatalog() < 0) {
|
if (device == null || device.getSubscribeCycleForCatalog() < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.info("[添加目录订阅] 设备 {}", device.getDeviceId());
|
if (transactionInfo == null) {
|
||||||
|
log.info("[添加目录订阅] 设备 {}", device.getDeviceId());
|
||||||
|
}else {
|
||||||
|
log.info("[目录订阅续期] 设备 {}", device.getDeviceId());
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
sipCommander.catalogSubscribe(device, transactionInfo, eventResult -> {
|
sipCommander.catalogSubscribe(device, transactionInfo, eventResult -> {
|
||||||
ResponseEvent event = (ResponseEvent) eventResult.event;
|
ResponseEvent event = (ResponseEvent) eventResult.event;
|
||||||
@ -566,7 +570,11 @@ public class DeviceServiceImpl implements IDeviceService, CommandLineRunner {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addMobilePositionSubscribe(@NotNull Device device, SipTransactionInfo transactionInfo) {
|
public boolean addMobilePositionSubscribe(@NotNull Device device, SipTransactionInfo transactionInfo) {
|
||||||
log.info("[添加移动位置订阅] 设备 {}", device.getDeviceId());
|
if (transactionInfo == null) {
|
||||||
|
log.info("[添加移动位置订阅] 设备 {}", device.getDeviceId());
|
||||||
|
}else {
|
||||||
|
log.info("[移动位置订阅续期] 设备 {}", device.getDeviceId());
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
sipCommander.mobilePositionSubscribe(device, transactionInfo, eventResult -> {
|
sipCommander.mobilePositionSubscribe(device, transactionInfo, eventResult -> {
|
||||||
ResponseEvent event = (ResponseEvent) eventResult.event;
|
ResponseEvent event = (ResponseEvent) eventResult.event;
|
||||||
|
|||||||
@ -94,14 +94,7 @@ public class DeviceStatusTaskRunner {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.debug("[更新状态任务时间] 编号: {}", key);
|
log.debug("[更新状态任务时间] 编号: {}", key);
|
||||||
if (delayQueue.contains(task)) {
|
|
||||||
boolean remove = delayQueue.remove(task);
|
|
||||||
if (!remove) {
|
|
||||||
log.info("[更新状态任务时间] 从延时队列内移除失败: {}", key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
delayQueue.offer(task);
|
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getDeviceId());
|
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getDeviceId());
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
||||||
redisTemplate.expire(redisKey, duration);
|
redisTemplate.expire(redisKey, duration);
|
||||||
|
|||||||
@ -94,14 +94,7 @@ public class SubscribeTaskRunner{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.info("[更新订阅任务时间] {}, 编号: {}", task.getName(), key);
|
log.info("[更新订阅任务时间] {}, 编号: {}", task.getName(), key);
|
||||||
if (delayQueue.contains(task)) {
|
|
||||||
boolean remove = delayQueue.remove(task);
|
|
||||||
if (!remove) {
|
|
||||||
log.info("[更新订阅任务时间] 从延时队列内移除失败: {}", key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
delayQueue.offer(task);
|
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getKey());
|
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getKey());
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
||||||
redisTemplate.expire(redisKey, duration);
|
redisTemplate.expire(redisKey, duration);
|
||||||
|
|||||||
@ -114,14 +114,7 @@ public class PlatformStatusTaskRunner {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.info("[更新平台注册任务时间] 平台上级编号: {}", platformServerId);
|
log.info("[更新平台注册任务时间] 平台上级编号: {}", platformServerId);
|
||||||
if (registerDelayQueue.contains(task)) {
|
|
||||||
boolean remove = registerDelayQueue.remove(task);
|
|
||||||
if (!remove) {
|
|
||||||
log.info("[更新平台注册任务时间] 从延时队列内移除失败: {}", platformServerId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
registerDelayQueue.offer(task);
|
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), platformServerId);
|
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), platformServerId);
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
||||||
redisTemplate.expire(redisKey, duration);
|
redisTemplate.expire(redisKey, duration);
|
||||||
@ -165,14 +158,7 @@ public class PlatformStatusTaskRunner {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.info("[更新平台心跳任务时间] 平台上级编号: {}", platformServerId);
|
log.info("[更新平台心跳任务时间] 平台上级编号: {}", platformServerId);
|
||||||
if (keepaliveTaskDelayQueue.contains(task)) {
|
|
||||||
boolean remove = keepaliveTaskDelayQueue.remove(task);
|
|
||||||
if (!remove) {
|
|
||||||
log.info("[更新平台心跳任务时间] 从延时队列内移除失败: {}", platformServerId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
keepaliveTaskDelayQueue.offer(task);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -446,7 +446,6 @@ public class ZLMRESTfulUtils {
|
|||||||
BigDecimal bigDecimal = new BigDecimal(stamp);
|
BigDecimal bigDecimal = new BigDecimal(stamp);
|
||||||
param.put("stamp", bigDecimal);
|
param.put("stamp", bigDecimal);
|
||||||
param.put("schema", schema);
|
param.put("schema", schema);
|
||||||
System.out.println(bigDecimal);
|
|
||||||
return sendPost(mediaServer, "seekRecordStamp",param, null);
|
return sendPost(mediaServer, "seekRecordStamp",param, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,11 +198,4 @@ public class DateUtil {
|
|||||||
return ChronoUnit.MILLIS.between(startInstant, endInstant);
|
return ChronoUnit.MILLIS.between(startInstant, endInstant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
long difference = getDifference("2025-05-21 13:00:00", "2025-05-21 13:30:00")/1000;
|
|
||||||
System.out.println(difference);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -259,7 +259,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
queryCloudRecords: function(row) {
|
queryCloudRecords: function(row) {
|
||||||
this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`)
|
this.$router.push(`/cloudRecord/detail/${row.app}/${row.stream}`)
|
||||||
},
|
},
|
||||||
deleteStreamProxy: function(row) {
|
deleteStreamProxy: function(row) {
|
||||||
this.$confirm('确定删除此代理吗?', '提示', {
|
this.$confirm('确定删除此代理吗?', '提示', {
|
||||||
|
|||||||
@ -255,7 +255,7 @@ export default {
|
|||||||
this.getPushList()
|
this.getPushList()
|
||||||
},
|
},
|
||||||
queryCloudRecords: function(row) {
|
queryCloudRecords: function(row) {
|
||||||
this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`)
|
this.$router.push(`/cloudRecord/detail/${row.app}/${row.stream}`)
|
||||||
},
|
},
|
||||||
importChannel: function() {
|
importChannel: function() {
|
||||||
this.$refs.importChannel.openDialog(() => {})
|
this.$refs.importChannel.openDialog(() => {})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user