Explorar o código

修复web端用户中心异常问题

kindring %!s(int64=2) %!d(string=hai) anos
pai
achega
3956d5d929

+ 1 - 0
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java

@@ -176,6 +176,7 @@ public class DeviceServiceImpl implements IDeviceService {
         logger.error("[设备离线],{}, device:{}", reason, deviceId);
         Device device = deviceMapper.getDeviceByDeviceId(deviceId);
         if (device == null) {
+            logger.error("device {} offline!!!",deviceId);
             return;
         }
         String registerExpireTaskKey = VideoManagerConstants.REGISTER_EXPIRE_TASK_KEY_PREFIX + deviceId;

+ 7 - 55
src/main/resources/application.yml

@@ -33,12 +33,13 @@ spring:
         type: com.alibaba.druid.pool.DruidDataSource
         driver-class-name: com.mysql.cj.jdbc.Driver
 #        url: jdbc:mysql://kindring.cn:6543/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
-        url: jdbc:mysql://192.168.1.203:6543/gb_db?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
+#        url: jdbc:mysql://192.168.1.203:6543/gb_db?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
+        url: jdbc:mysql://127.0.0.1:3306/gb_db?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
 
         #        username: gpsuser
 #        password: tianhui2013
-        username: hfygb
-        password: hfygb28181
+        username: root
+        password: 12345678
         druid:
             initialSize: 10                       # 连接池初始化连接数
             maxActive: 200                        # 连接池最大连接数
@@ -75,9 +76,9 @@ rj-druid-manage:
 
 # [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
 server:
-    port: 29002
+    port: 19200
     http:
-        port: 29001
+        port: 19201
     # [可选] HTTPS配置, 默认不开启
     ssl:
         # [可选] 是否开启HTTPS访问
@@ -101,7 +102,7 @@ sip:
     # [必须修改] 本机的IP
     ip: 0.0.0.0
     # [可选] 28181服务监听的端口
-    port: 29000
+    port: 19202
     # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007)
     # 后两位为行业编码,定义参照附录D.3
     # 3701020049标识山东济南历下区 信息行业接入
@@ -124,55 +125,6 @@ sip:
     # hfy ai图片存储位置
     mediaPath: "mFile"
 
-#zlm 默认服务器配置
-#media:
-#    # [必须修改] zlm服务器唯一id,用于触发hook时区别是哪台服务器,general.mediaServerId
-#    id: your_server_id_fail
-#    # [必须修改] zlm服务器的内网IP
-#    ip: 191.168.1.60
-#    # [可选] 返回流地址时的ip,置空使用 media.ip
-#    stream-ip: 192.168.1.60
-#    #stream-ip: 192.168.1.203
-#    #stream-ip: 113.88.194.58
-#    # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip
-#    sdp-ip: 192.168.31.60
-#    #sdp-ip: 192.168.1.203
-#    #sdp-ip: 113.88.194.58
-#    # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
-#    hook-ip:
-#    # [必须修改] zlm服务器的http.port
-#    http-port: 15070
-#    # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置
-#    http-ssl-port: 29010
-#    # [可选] zlm服务器的rtmp.port, 置空使用zlm配置文件配置
-#    rtmp-port:
-#    # [可选] zlm服务器的rtmp.sslport, 置空使用zlm配置文件配置
-#    rtmp-ssl-port:
-#    # [可选] zlm服务器的 rtp_proxy.port, 置空使用zlm配置文件配置
-#    rtp-proxy-port:
-#    # [可选] zlm服务器的 rtsp.port, 置空使用zlm配置文件配置
-#    rtsp-port:
-#    # [可选] zlm服务器的 rtsp.sslport, 置空使用zlm配置文件配置
-#    rtsp-ssl-port:
-#    # [可选] 是否自动配置ZLM, 如果希望手动配置ZLM, 可以设为false, 不建议新接触的用户修改
-#    auto-config: true
-#    # [可选] zlm服务器的hook.admin_params=secret
-#    secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
-##    secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc
-#    # [可选] zlm服务器的general.streamNoneReaderDelayMS
-#    stream-none-reader-delay-ms:  60000  # 无人观看多久自动关闭流, -1表示永不自动关闭,即 关闭按需拉流
-#    # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试
-#    rtp:
-#        # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输
-#        enable: true
-#        # [可选] 在此范围内选择端口用于媒体流传输, 必须提前在zlm上配置该属性,不然自动配置此属性可能不成功
-#        port-range: 30000,30500 # 端口范围
-#        # [可选] 国标级联在此范围内选择端口发送媒体流
-#        send-port-range: 30000,30500 # 端口范围
-#    rtcIp:
-#    rtcPort:
-#    # 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用
-#    record-assist-port: 0
 
 # [可选] 日志配置, 一般不需要改
 logging:

+ 9 - 2
web_src/src/components/u_page/u_info.vue

@@ -14,7 +14,7 @@
       <div class="u-i-info">
         <h2>欢迎回来
           <span class="text-ornament">【</span>
-          <span class="text-user">{{this.$cookies.get("session").username}}</span>
+          <span class="text-user">{{username}}</span>
           <span class="text-ornament">】</span>
         </h2>
       </div>
@@ -30,12 +30,19 @@
 import api_user from "@/apiStore/api_user";
 import handle from "@/until/handle";
 import ChangePassword from "@/components/dialog/changePassword";
+import userService from "@/components/service/UserService";
 
 export default {
   name: "u_info",
   components: {ChangePassword},
   data(){
-    return {}
+    return {
+      username: ""
+    }
+  },
+  beforeMount() {
+    let u = userService.getUser();
+    this.username = u.username;
   },
   methods:{
     toBack(){