From 428c045aab76965a33df46b3c1d3212d9e0db1d7 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: Thu, 29 Apr 2021 17:14:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=9C=AA=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/RegisterRequestProcessor.java | 8 +-
web_src/src/components/UiHeader.vue | 6 +
web_src/src/components/setting/Media.vue | 121 ++++++++++++++++++
web_src/src/components/setting/Sip.vue | 83 ++++++++++++
web_src/src/components/setting/Web.vue | 83 ++++++++++++
web_src/src/router/index.js | 20 ++-
6 files changed, 314 insertions(+), 7 deletions(-)
create mode 100644 web_src/src/components/setting/Media.vue
create mode 100644 web_src/src/components/setting/Sip.vue
create mode 100644 web_src/src/components/setting/Web.vue
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java
index a4d7816c..aa501d93 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java
@@ -105,12 +105,11 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
// 添加Expires头
response.addHeader(request.getExpires());
- // 1.获取到通信地址等信息,保存到Redis
+ // 获取到通信地址等信息
FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
String received = viaHeader.getReceived();
int rPort = viaHeader.getRPort();
- // 本地模拟设备 received 为空 rPort 为 -1
// 解析本地地址替代
if (StringUtils.isEmpty(received) || rPort == -1) {
received = viaHeader.getHost();
@@ -152,15 +151,12 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
// 下发catelog查询目录
if (registerFlag == 1 ) {
logger.info("[{}] 注册成功! deviceId:" + device.getDeviceId(), requestAddress);
- // boolean exists = storager.exists(device.getDeviceId());
device.setRegisterTimeMillis(System.currentTimeMillis());
storager.updateDevice(device);
publisher.onlineEventPublish(device.getDeviceId(), VideoManagerConstants.EVENT_ONLINE_REGISTER);
// 重新注册更新设备和通道,以免设备替换或更新后信息无法更新
- //if (!exists) {
- handler.onRegister(device);
- //}
+ handler.onRegister(device);
} else if (registerFlag == 2) {
logger.info("[{}] 注销成功! deviceId:" + device.getDeviceId(), requestAddress);
publisher.outlineEventPublish(device.getDeviceId(), VideoManagerConstants.EVENT_OUTLINE_UNREGISTER);
diff --git a/web_src/src/components/UiHeader.vue b/web_src/src/components/UiHeader.vue
index f1b0e1da..b455aff2 100644
--- a/web_src/src/components/UiHeader.vue
+++ b/web_src/src/components/UiHeader.vue
@@ -7,6 +7,12 @@
拉流代理
国标级联
在线文档
+
+
+
+
+
+
diff --git a/web_src/src/components/setting/Media.vue b/web_src/src/components/setting/Media.vue
new file mode 100644
index 00000000..cfc4e12a
--- /dev/null
+++ b/web_src/src/components/setting/Media.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
diff --git a/web_src/src/components/setting/Sip.vue b/web_src/src/components/setting/Sip.vue
new file mode 100644
index 00000000..767fdb76
--- /dev/null
+++ b/web_src/src/components/setting/Sip.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+ 国标服务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web_src/src/components/setting/Web.vue b/web_src/src/components/setting/Web.vue
new file mode 100644
index 00000000..5eb853a1
--- /dev/null
+++ b/web_src/src/components/setting/Web.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+ WEB服务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web_src/src/router/index.js b/web_src/src/router/index.js
index bc40855e..a56ce99d 100644
--- a/web_src/src/router/index.js
+++ b/web_src/src/router/index.js
@@ -10,6 +10,9 @@ import devicePosition from '../components/devicePosition.vue'
import login from '../components/Login.vue'
import parentPlatformList from '../components/ParentPlatformList.vue'
import test from '../components/test.vue'
+import web from '../components/setting/Web.vue'
+import sip from '../components/setting/Sip.vue'
+import media from '../components/setting/Media.vue'
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
@@ -57,7 +60,22 @@ export default new VueRouter({
path: '/devicePosition/:deviceId/:parentChannelId/:count/:page',
name: 'devicePosition',
component: devicePosition,
- },,
+ },
+ {
+ path: '/setting/web',
+ name: 'web',
+ component: web,
+ },
+ {
+ path: '/setting/sip',
+ name: 'sip',
+ component: sip,
+ },
+ {
+ path: '/setting/media',
+ name: 'media',
+ component: media,
+ },
{
path: '/test',
name: 'test',