Browse Source

单点登录优化

S0025136190 1 year ago
parent
commit
e2c694d225

+ 2 - 1
Backend/sample/src/main/java/com/dji/sample/manage/service/impl/UserServiceImpl.java

@@ -394,7 +394,8 @@ public class UserServiceImpl implements IUserService {
         //用户入库
         QueryWrapper<UserEntity> userWrapper = new QueryWrapper<>();
         userWrapper.lambda().eq(UserEntity::getUserType,UserTypeEnum.WEB.getVal())
-                .eq(UserEntity::getClientId,clientId);
+                .eq(UserEntity::getClientId,clientId)
+                .eq(UserEntity::getUsername,username);
         UserEntity userEntity = mapper.selectOne(userWrapper);
         if(userEntity == null) {
             userEntity = new UserEntity();

+ 21 - 21
Backend/sample/src/main/resources/application-prd.yml

@@ -45,20 +45,20 @@ mqtt:
   # BASIC parameters are required.
   BASIC:
     protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: xia0miduo.gicp.net
+    host: 49.234.30.234
     port: 1883
-    username: mqttUser
-    password: 123456
+    username: admin
+    password: T1SqDxbdSPVV24
     client-id: testServer
     # If the protocol is ws/wss, this value is required.
     path:
   DRC:
     protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: xia0miduo.gicp.net
+    host: 49.234.30.234
     port: 8083
     path: /mqtt
-    username: mqttUser
-    password: 123456
+    username: admin
+    password: T1SqDxbdSPVV24
 
 cloud-sdk:
   mqtt:
@@ -115,9 +115,9 @@ url:
 oss:
   enable: true
   provider: minio
-  endpoint: http://60.204.184.98:39000
-  access-key: dji_minio2
-  secret-key: 12345678
+  endpoint: http://49.234.30.234:9002
+  access-key: admin
+  secret-key: Qwer~123.
   bucket: dji-cloudapi
   expire: 3600
   region: us-east-1
@@ -143,18 +143,18 @@ cloud-api:
 livestream:
   url:
     # It is recommended to use a program to create Token. https://github.com/AgoraIO/Tools/blob/master/DynamicKey/AgoraDynamicKey/java/src/main/java/io/agora/media/RtcTokenBuilder2.java
-    agora:
-      channel: Please enter the agora channel.
-      token: Please enter the agora temporary token.
-      uid:  654321
+#    agora:
+#      channel: Please enter the agora channel.
+#      token: Please enter the agora temporary token.
+#      uid:  654321
 
     # RTMP  Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
-    rtmp:
-      url: Please enter the rtmp access address.  # Example: 'rtmp://192.168.1.1/live/'
-    rtsp:
-      username: Please enter the username.
-      password: Please enter the password.
-      port: 8554
+#    rtmp:
+#      url: Please enter the rtmp access address.  # Example: 'rtmp://192.168.1.1/live/'
+#    rtsp:
+#      username: Please enter the username.
+#      password: Please enter the password.
+#      port: 8554
 
     # GB28181 Note:If you don't know what these parameters mean, you can go to Pilot2 and select the GB28181 page in the cloud platform. Where the parameters same as these parameters.
 #    gb28181:
@@ -167,5 +167,5 @@ livestream:
 #      channel: Please enter the channel.
 
     # Webrtc: Only supports using whip standard
-    whip:
-      url: Please enter the rtmp access address. #  Example:http://192.168.1.1:1985/rtc/v1/whip/?app=live&stream=
+#    whip:
+#      url: Please enter the rtmp access address. #  Example:http://192.168.1.1:1985/rtc/v1/whip/?app=live&stream=

+ 8 - 7
Backend/sample/src/main/resources/application.yml

@@ -42,25 +42,26 @@ jwt:
   secret: CloudApiSample
   age: 86400
 
+
 mqtt:
   # @see com.dji.sample.component.mqtt.model.MqttUseEnum
   # BASIC parameters are required.
   BASIC:
     protocol: MQTT # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: xia0miduo.gicp.net
+    host: 49.234.30.234
     port: 1883
-    username: mqttUser
-    password: 123456
-    client-id: hqjiang
+    username: admin
+    password: T1SqDxbdSPVV24
+    client-id: testServer
     # If the protocol is ws/wss, this value is required.
     path:
   DRC:
     protocol: WS # @see com.dji.sample.component.mqtt.model.MqttProtocolEnum
-    host: xia0miduo.gicp.net
+    host: 49.234.30.234
     port: 8083
     path: /mqtt
-    username: mqttUser
-    password: 123456
+    username: admin
+    password: T1SqDxbdSPVV24
 
 cloud-sdk:
   mqtt: