From 7732a1d180f04ea8e3cd569a73a9288bca5626e9 Mon Sep 17 00:00:00 2001
From: wendy512 <wendy512@yeah.net>
Date: 星期四, 18 七月 2024 13:40:47 +0800
Subject: [PATCH] 解决国标视频回放判断streamMode时空指针异常问题

---
 src/main/java/com/genersoft/iot/vmp/service/impl/UserServiceImpl.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/UserServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/UserServiceImpl.java
old mode 100644
new mode 100755
index efbb24d..fb97db9
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/UserServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/UserServiceImpl.java
@@ -1,5 +1,6 @@
 package com.genersoft.iot.vmp.service.impl;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.genersoft.iot.vmp.service.IUserService;
 import com.genersoft.iot.vmp.storager.dao.UserMapper;
 import com.genersoft.iot.vmp.storager.dao.dto.User;
@@ -12,6 +13,7 @@
 import java.util.List;
 
 @Service
+@DS("master")
 public class UserServiceImpl implements IUserService {
 
     @Autowired
@@ -27,6 +29,11 @@
         User user = userMapper.selectById(id);
         user.setPassword(password);
         return userMapper.update(user) > 0;
+    }
+
+    @Override
+    public User getUserById(int id) {
+        return userMapper.selectById(id);
     }
 
     @Override
@@ -70,7 +77,6 @@
                 continue;
             }
             String checkStr = callId == null? user.getPushKey():(callId + "_" + user.getPushKey())  ;
-            System.out.println(checkStr);
             String checkSign = DigestUtils.md5DigestAsHex(checkStr.getBytes());
             if (checkSign.equals(sign)) {
                 return true;

--
Gitblit v1.8.0