瀏覽代碼

直播注册

liujc 2 年之前
父節點
當前提交
298be62792

+ 243 - 251
.idea/httpRequests/http-requests-log.http

@@ -1,593 +1,585 @@
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorFingerprint?code=0413aiGa1MplkF0RyGGa1sf6S143aiGv
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
+Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-18T145501.200.json
+<> 2023-05-19T175057.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorFingerprint?code=0413aiGa1MplkF0RyGGa1sf6S143aiGv
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=true
+Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-18T145309.200.json
+<> 2023-05-19T175049.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/sysConfig/queryByParamName?paramName=wechat_appid
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
+Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-17T183050.200.json
+<> 2023-05-19T175037.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 82
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
+Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248324-1683860932420", "excludeBlacklist": 0}
-
-<> 2023-05-12T191018.200.json
+<> 2023-05-19T174858.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 82
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248479&microphoneFlag=false
+Authorization: bearer aeec0ea9-4079-4765-aa72-346a7d37e735
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248324-1683860932420", "excludeBlacklist": 1}
-
-<> 2023-05-12T191000.200.json
+<> 2023-05-19T174628.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 100
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e
 
-<> 2023-05-12T190114.200.json
+<> 2023-05-19T174545.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248380&microphoneFlag=false
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T185307.200.json
+<> 2023-05-19T174527.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248380&microphoneFlag=false
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184904.200.json
+<> 2023-05-19T174458.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248380&microphoneFlag=false
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184725.200.json
+<> 2023-05-19T174300.200.json
 
 ###
 
-POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
-Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248380&microphoneFlag=false
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
-
-<> 2023-05-12T184519.200.json
+<> 2023-05-19T174052.200.json
 
 ###
 
 POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Authorization: bearer fcf13dd1-6f06-40ae-a36e-22b4df4d5d01
 Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+Content-Length: 45
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+{
+  "roomUid": "LIVE-2248336-1684474334299"
+}
 
-<> 2023-05-12T184412.200.json
+<> 2023-05-19T173652.200.json
 
 ###
 
 POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Authorization: bearer fcf13dd1-6f06-40ae-a36e-22b4df4d5d01
 Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+Content-Length: 45
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+{
+  "roomUid": "LIVE-2248336-1684474334299"
+}
 
-<> 2023-05-12T183529.200.json
+<> 2023-05-19T173417.200.json
 
 ###
 
 POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Authorization: bearer fcf13dd1-6f06-40ae-a36e-22b4df4d5d01
 Content-Type: application/json
-Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
-Content-Length: 59
-Proxy-Connection: Keep-Alive
+Content-Length: 2
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+{}
 
-<> 2023-05-12T183456.200.json
+<> 2023-05-19T173333.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorRoomInfo?roomUid=LIVE-2248475-1683777517444&userId=10001
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Authorization: bearer fcf13dd1-6f06-40ae-a36e-22b4df4d5d01
+Content-Length: 2
+Content-Type: */*; charset=UTF-8
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T204659.200.json
+{}
+
+<> 2023-05-19T173320.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111112
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Authorization: bearer fcf13dd1-6f06-40ae-a36e-22b4df4d5d01
+Content-Length: 0
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T204644.200.json
+<> 2023-05-19T173307.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorJoinRoom?roomUid=LIVE-2248475-1683777517444&userId=10000
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/imLiveBroadcastRoom/joinRoom?roomUid=LIVE-2248336-1684474334299&userId=2248380&microphoneFlag=false
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T204620.200.json
+<> 2023-05-19T173156.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorRoomInfo?roomUid=LIVE-2248475-1683777517444&userId=10000
-Proxy-Connection: Keep-Alive
+POST http://localhost:9001/user/update
+Authorization: bearer b4d5c0d2-3faf-48f3-a5d6-6301cc1e1af6
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 45
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T204529.200.json
+username=ces&currentClass=1&currentGradeNum=3
+
+<> 2023-05-19T172903.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T204510.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T172200.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111112
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T203037.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T172138.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T203024.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T172025.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T203016.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T171911.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T202954.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T171355.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T202704.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T171229.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T202141.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T171144.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 111
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T202117.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=1
+
+<> 2023-05-19T171124.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorJoinRoom?roomUid=LIVE-2248475-1683777517444&userId=10000
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 114
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T201906.200.json
+clientId=student&clientSecret=student&phone=19900990088&smsCode=666666&deviceNum=190e35f7e15650ef33e&isLessee=true
+
+<> 2023-05-19T171047.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorRoomInfo?roomUid=LIVE-2248475-1683777517444&userId=10000
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin?clientId=student&clientSecret=student&phone=19900880088&smsCode=666666&isLessee=true
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 0
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T201829.200.json
+<> 2023-05-19T170945.200.json
 
 ###
 
-GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
-Proxy-Connection: Keep-Alive
+POST http://127.0.0.1:8001/smsLogin?clientId=student&clientSecret=student&phone=19900880088&smsCode=666666&isLessee=true
+Content-Type: application/json
+Content-Length: 0
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-11T201306.200.json
+<> 2023-05-19T170850.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
-Content-Type: application/json
-Content-Length: 127
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorFingerprint?code=0413aiGa1MplkF0RyGGa1sf6S143aiGv
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902",
-  "smsCode": "666666"
-}
-
-<> 2023-05-10T212648.200.json
+<> 2023-05-18T145501.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
-Content-Type: application/json
-Content-Length: 104
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorFingerprint?code=0413aiGa1MplkF0RyGGa1sf6S143aiGv
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
-
-<> 2023-05-10T212627.200.json
+<> 2023-05-18T145309.200.json
 
 ###
 
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
-Proxy-Connection: Keep-Alive
+GET http://127.0.0.1:9001/open/sysConfig/queryByParamName?paramName=wechat_appid
+Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T202004.200.json
+<> 2023-05-17T183050.200.json
 
 ###
 
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 82
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T201748.200.json
+{"rows":10,"page":1,"roomUid":"LIVE-2248324-1683860932420", "excludeBlacklist": 0}
+
+<> 2023-05-12T191018.200.json
 
 ###
 
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 82
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T201724.200.json
+{"rows":10,"page":1,"roomUid":"LIVE-2248324-1683860932420", "excludeBlacklist": 1}
+
+<> 2023-05-12T191000.200.json
 
 ###
 
-POST http://127.0.0.1:8001/smsLogin?clientId=EDUCATION&clientSecret=EDUCATION&deviceNum=&phone=18682475952&smsCode=666666
-Content-Type: application/x-www-form-urlencoded
-Content-Length: 2
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T201707.200.json
+<> 2023-05-12T190114.200.json
 
 ###
 
-POST http://127.0.0.1:8001/smsLogin?clientId=EDUCATION&clientSecret=EDUCATION&deviceNum=&phone=18682475901&smsCode=666666
-Content-Type: application/x-www-form-urlencoded
-Content-Length: 2
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T201654.200.json
+<> 2023-05-12T185307.200.json
 
 ###
 
-GET http://127.0.0.1:8005/schoolStaff/cooperation
-Authorization: bearer 7d12c468-e8cf-4e81-bc56-a9de18ba8fc5
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T201550.200.json
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+
+<> 2023-05-12T184904.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
 Content-Type: application/json
-Content-Length: 104
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T155616.200.json
+<> 2023-05-12T184725.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
 Content-Type: application/json
-Content-Length: 104
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T154304.200.json
+<> 2023-05-12T184519.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
 Content-Type: application/json
-Content-Length: 104
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T154238.200.json
+<> 2023-05-12T184412.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
 Content-Type: application/json
-Content-Length: 104
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "ORCHESTRA_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
 
-<> 2023-05-10T154216.200.json
+<> 2023-05-12T183529.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+POST http://127.0.0.1:8005/imLiveBroadcastRoomMember/queryRoomMember
+Content-Type: application/json
+Authorization: bearer 70c30cec-f77c-4871-beaa-ce4b5224bf3e
+Content-Length: 59
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T153150.200.json
+{"rows":10,"page":1,"roomUid":"LIVE-2248475-1683777517444"}
+
+<> 2023-05-12T183456.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorRoomInfo?roomUid=LIVE-2248475-1683777517444&userId=10001
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T152508.200.json
+<> 2023-05-11T204659.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111112
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T152417.200.json
+<> 2023-05-11T204644.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorJoinRoom?roomUid=LIVE-2248475-1683777517444&userId=10000
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T152236.200.json
+<> 2023-05-11T204620.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorRoomInfo?roomUid=LIVE-2248475-1683777517444&userId=10000
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T152033.200.json
+<> 2023-05-11T204529.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T151724.200.json
+<> 2023-05-11T204510.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111112
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T151501.200.json
+<> 2023-05-11T203037.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
-tenantid: 1
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T151443.200.json
+<> 2023-05-11T203024.200.json
 
 ###
 
-GET http://127.0.0.1:8006/news/list?type=29
-Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-<> 2023-05-10T151238.200.json
+<> 2023-05-11T203016.200.json
 
 ###
 
-POST http://127.0.0.1:8005/open/school/staffSave
-Content-Type: application/json
-Content-Length: 101
+GET http://127.0.0.1:9001/open/liveBroadcastRoom/visitorCredentials?roomUid=LIVE-2248475-1683777517444&fingerprint=111111111
 Proxy-Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
 Accept-Encoding: br,deflate,gzip,x-gzip
 
-{
-  "schoolId": 3,
-  "userType": "SCHOOL_LEADER",
-  "username": "李四",
-  "mobile": "18682475902"
-}
-
-<> 2023-05-09T163940.200.json
+<> 2023-05-11T202954.200.json
 
 ###
 

+ 152 - 148
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/provider/PhoneAuthenticationProvider.java

@@ -26,156 +26,160 @@ import com.ym.mec.common.service.IdGeneratorService;
 
 public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider {
 
-	private UserDetailsService userDetailsService;
-
-	private IdGeneratorService smsCodeService;
-
-	private SysUserService sysUserService;
-	
-	private SysUserDeviceService sysUserDeviceService;
-
-	private RedisCache<String,Object> redisCache;
-
-	@Override
-	protected void additionalAuthenticationChecks(UserDetails userDetails, Authentication authentication) throws AuthenticationException {
-
-		if (authentication.getCredentials() == null) {
-			throw new BadCredentialsException(this.messages.getMessage("PhoneAuthenticationProvider.badCredentials", "Bad credentials"));
-		}
-	}
-
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	protected UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
-		LoginEntity loginEntity = (LoginEntity) authentication.getCredentials();
-		if (loginEntity == null) {
-			throw new BadCredentialsException("Bad credentials");
-		}
-		String smsCode = loginEntity.getSmsCode();
-		String phone = loginEntity.getPhone();
-		String clientId = loginEntity.getClientId();
-
-		// 验证码验证
-		if (!clientId.startsWith("QR_") && !smsCodeService.verifyValidCode(phone, smsCode)) {
-			throw new BadCredentialsException("验证码校验失败");
-		}
-
-
-		Boolean isRegister = loginEntity.getIsRegister();
-		
-		String deviceNum = loginEntity.getDeviceNum();
-
-
-
-		SysUserInfo userInfo;
-
-		if (clientId.startsWith("QR_")) {
-			Object data = redisCache.get(loginEntity.getPhone());
-			if (data == null) {
-				throw new LockedException("用户不存在");
-			} else {
-				redisCache.delete(loginEntity.getPhone());
-				QRLoginDto loginDto = (QRLoginDto) data;
-				if (loginDto.getPrivateKey().equals(loginEntity.getSmsCode())) {
-					userInfo = loginDto.getUserInfo();
-					username = username.replaceAll(loginDto.getCode(),userInfo.getSysUser().getPhone());
-				} else {
-					throw new LockedException("用户不存在");
-				}
-			}
-		} else {
-			userInfo = sysUserService.queryUserInfoByPhone(phone);
-		}
-
-		if (userInfo == null) {
-			if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
-				throw new LockedException("用户不存在");
-			}
-			
-			userInfo = sysUserService.initUser(loginEntity.getTenantId(), loginEntity.getOrganId(), loginEntity.getPhone(), clientId);
-			
-			if (StringUtils.isNotBlank(deviceNum)) {
-				sysUserDeviceService.bindDevice(clientId, userInfo.getSysUser().getId(), deviceNum, userInfo.getSysUser().getTenantId());
-			}
-		} else {
-			SysUser user = userInfo.getSysUser();
-			if (user == null) {
-				throw new LockedException("用户不存在");
-			}
-			//如果机构不一致,不允许跨机构注册
+    private UserDetailsService userDetailsService;
+
+    private IdGeneratorService smsCodeService;
+
+    private SysUserService sysUserService;
+
+    private SysUserDeviceService sysUserDeviceService;
+
+    private RedisCache<String,Object> redisCache;
+
+    @Override
+    protected void additionalAuthenticationChecks(UserDetails userDetails, Authentication authentication) throws AuthenticationException {
+
+        if (authentication.getCredentials() == null) {
+            throw new BadCredentialsException(this.messages.getMessage("PhoneAuthenticationProvider.badCredentials", "Bad credentials"));
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    protected UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
+        LoginEntity loginEntity = (LoginEntity) authentication.getCredentials();
+        if (loginEntity == null) {
+            throw new BadCredentialsException("Bad credentials");
+        }
+        String smsCode = loginEntity.getSmsCode();
+        String phone = loginEntity.getPhone();
+        String clientId = loginEntity.getClientId();
+
+        // 验证码验证
+        if (!clientId.startsWith("QR_") && !smsCodeService.verifyValidCode(phone, smsCode)) {
+            throw new BadCredentialsException("验证码校验失败");
+        }
+
+
+        Boolean isRegister = loginEntity.getIsRegister();
+
+        String deviceNum = loginEntity.getDeviceNum();
+
+
+        SysUserInfo userInfo;
+
+        if (clientId.startsWith("QR_")) {
+            Object data = redisCache.get(loginEntity.getPhone());
+            if (data == null) {
+                throw new LockedException("用户不存在");
+            } else {
+                redisCache.delete(loginEntity.getPhone());
+                QRLoginDto loginDto = (QRLoginDto) data;
+                if (loginDto.getPrivateKey().equals(loginEntity.getSmsCode())) {
+                    userInfo = loginDto.getUserInfo();
+                    username = username.replaceAll(loginDto.getCode(),userInfo.getSysUser().getPhone());
+                } else {
+                    throw new LockedException("用户不存在");
+                }
+            }
+        } else {
+            userInfo = sysUserService.queryUserInfoByPhone(phone);
+        }
+
+        if (userInfo == null) {
+            if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
+                throw new LockedException("用户不存在");
+            }
+
+            userInfo = sysUserService.initUser(loginEntity.getTenantId(), loginEntity.getOrganId(), loginEntity.getPhone(), clientId);
+
+            if (StringUtils.isNotBlank(deviceNum)) {
+                sysUserDeviceService.bindDevice(clientId, userInfo.getSysUser().getId(), deviceNum, userInfo.getSysUser().getTenantId());
+            }
+        } else {
+            SysUser user = userInfo.getSysUser();
+            if (user == null) {
+                throw new LockedException("用户不存在");
+            }
+            //如果机构不一致,不允许跨机构注册
 //			if(loginEntity.getTenantId() != null && loginEntity.getTenantId() != 0 &&
 //					!loginEntity.getTenantId().equals(user.getTenantId())){
 //				throw new LockedException("用户已注册");
 //			}
-			if (StringUtils.isNotBlank(deviceNum)) {
-				sysUserDeviceService.bindDevice(clientId, user.getId(), deviceNum, userInfo.getSysUser().getTenantId());
-			}
-
-			if (clientId.startsWith("QR_")) {
-			} else  if (!userInfo.getSysUser().getUserType().contains(clientId)) {
-				if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
-					throw new LockedException("用户不存在");
-				} else {
-					user.setUserType(user.getUserType() + "," + clientId);
-					user.setUpdateTime(new Date());
-
-					// 添加userType以及附加信息
-					if (StringUtils.equals("STUDENT", clientId)) {
-						user.setOrganId(Integer.parseInt(loginEntity.getOrganId()));
-						sysUserService.saveStudent(user.getId(),loginEntity.getTenantId());
-					} else if (StringUtils.equals("TEACHER", clientId)) {
-						sysUserService.saveTeacher(user.getId(),loginEntity.getTenantId());
-					}
-					sysUserService.update(user);
-				}
-			}
-		}
-
-		UserDetails loadedUser;
-		try {
-			loadedUser = userDetailsService.loadUserByUsername(username);
-		} catch (UsernameNotFoundException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new InternalAuthenticationServiceException(e.getMessage(), e);
-		}
-
-		if (loadedUser == null) {
-			throw new InternalAuthenticationServiceException("账户不存在");
-		} else {
-			return loadedUser;
-		}
-	}
-
-	@Override
-	protected Authentication createSuccessAuthentication(Object principal, Authentication authentication, UserDetails user) {
-		PhoneAuthenticationToken result = new PhoneAuthenticationToken(principal, authentication.getCredentials(), user.getAuthorities());
-		result.setDetails(authentication.getDetails());
-		return result;
-	}
-
-	@Override
-	public boolean supports(Class<?> aClass) {
-		return PhoneAuthenticationToken.class.isAssignableFrom(aClass);
-	}
-
-	public void setUserDetailsService(UserDetailsService userDetailsService) {
-		this.userDetailsService = userDetailsService;
-	}
-
-	public void setRedisCache(RedisCache<String, Object> redisCache) {
-		this.redisCache = redisCache;
-	}
-
-	public void setSysUserService(SysUserService sysUserService) {
-		this.sysUserService = sysUserService;
-	}
-
-	public void setSmsCodeService(IdGeneratorService smsCodeService) {
-		this.smsCodeService = smsCodeService;
-	}
-
-	public void setSysUserDeviceService(SysUserDeviceService sysUserDeviceService) {
-		this.sysUserDeviceService = sysUserDeviceService;
-	}
+            if (StringUtils.isNotBlank(deviceNum)) {
+                sysUserDeviceService.bindDevice(clientId, user.getId(), deviceNum, userInfo.getSysUser().getTenantId());
+            }
+
+            if (clientId.startsWith("QR_")) {
+            } else  if (!userInfo.getSysUser().getUserType().contains(clientId)) {
+                if (isRegister == false || StringUtils.equals("SYSTEM", clientId)) {
+                    throw new LockedException("用户不存在");
+                } else {
+                    user.setUserType(user.getUserType() + "," + clientId);
+                    user.setUpdateTime(new Date());
+
+                    // 添加userType以及附加信息
+                    if (StringUtils.equals("STUDENT", clientId)) {
+                        if (StringUtils.isBlank(loginEntity.getOrganId())) {
+                            user.setOrganId(sysUserService.getLesseeOrganId());
+                            loginEntity.setTenantId(1);
+                        } else {
+                            user.setOrganId(Integer.parseInt(loginEntity.getOrganId()));
+                        }
+                        sysUserService.saveStudent(user.getId(),loginEntity.getTenantId());
+                    } else if (StringUtils.equals("TEACHER", clientId)) {
+                        sysUserService.saveTeacher(user.getId(),loginEntity.getTenantId());
+                    }
+                    sysUserService.update(user);
+                }
+            }
+        }
+
+        UserDetails loadedUser;
+        try {
+            loadedUser = userDetailsService.loadUserByUsername(username);
+        } catch (UsernameNotFoundException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new InternalAuthenticationServiceException(e.getMessage(), e);
+        }
+
+        if (loadedUser == null) {
+            throw new InternalAuthenticationServiceException("账户不存在");
+        } else {
+            return loadedUser;
+        }
+    }
+
+    @Override
+    protected Authentication createSuccessAuthentication(Object principal, Authentication authentication, UserDetails user) {
+        PhoneAuthenticationToken result = new PhoneAuthenticationToken(principal, authentication.getCredentials(), user.getAuthorities());
+        result.setDetails(authentication.getDetails());
+        return result;
+    }
+
+    @Override
+    public boolean supports(Class<?> aClass) {
+        return PhoneAuthenticationToken.class.isAssignableFrom(aClass);
+    }
+
+    public void setUserDetailsService(UserDetailsService userDetailsService) {
+        this.userDetailsService = userDetailsService;
+    }
+
+    public void setRedisCache(RedisCache<String, Object> redisCache) {
+        this.redisCache = redisCache;
+    }
+
+    public void setSysUserService(SysUserService sysUserService) {
+        this.sysUserService = sysUserService;
+    }
+
+    public void setSmsCodeService(IdGeneratorService smsCodeService) {
+        this.smsCodeService = smsCodeService;
+    }
+
+    public void setSysUserDeviceService(SysUserDeviceService sysUserDeviceService) {
+        this.sysUserDeviceService = sysUserDeviceService;
+    }
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ImLiveBroadcastRoomMember.java

@@ -51,6 +51,9 @@ public class ImLiveBroadcastRoomMember implements Serializable {
     @ApiModelProperty(value = "禁言状态:0取消;1禁言")
     private Integer banStatus;
 
+    @TableField("microphone_flag_")
+    @ApiModelProperty(value = "是否能上麦:0否;1是")
+    private Boolean microphoneFlag;
     @TableField("live_room_status_")
     @ApiModelProperty(value = "直播状态: 0离开;1观看")
     private Integer liveRoomStatus;
@@ -74,6 +77,14 @@ public class ImLiveBroadcastRoomMember implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    public Boolean getMicrophoneFlag() {
+        return microphoneFlag;
+    }
+
+    public void setMicrophoneFlag(Boolean microphoneFlag) {
+        this.microphoneFlag = microphoneFlag;
+    }
+
     public Integer getWhetherMicStatus() {
         return whetherMicStatus;
     }

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomMemberVo.java

@@ -61,6 +61,9 @@ public class ImLiveBroadcastRoomMemberVo implements java.io.Serializable {
     @ApiModelProperty("游客凭据")
     private String fingerprint;
 
+    @ApiModelProperty(value = "是否能上麦:false否;true是")
+    private boolean microphoneFlag;
+
     public ImLiveBroadcastRoomSimpleMemberVo getSimpleMemberVo(ImLiveBroadcastRoomMemberVo memberVo) {
         return JSON.parseObject(JSON.toJSONString(memberVo), ImLiveBroadcastRoomSimpleMemberVo.class);
     }

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ImLiveBroadcastRoomService.java

@@ -87,6 +87,8 @@ public interface ImLiveBroadcastRoomService extends IService<ImLiveBroadcastRoom
 
     void joinRoom(String roomUid, Integer userId);
 
+    void joinRoom(String roomUid, Integer userId, Boolean microphoneFlag);
+
     /**
      * 游客加入直播间
      * @param roomUid 直播间编号

+ 18 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java

@@ -1429,6 +1429,12 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
      * @param userId  用户id
      */
     public void joinRoom(String roomUid, Integer userId) {
+        joinRoom(roomUid, userId, true);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void joinRoom(String roomUid, Integer userId,Boolean microphoneFlag) {
         //查询房间信息
         ImLiveBroadcastRoomVo imLiveBroadcastRoomVo = getImLiveBroadcastRoomVo(roomUid);
         if (Objects.isNull(imLiveBroadcastRoomVo)) {
@@ -1448,7 +1454,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         }
 
         // 加入直播间用户信息
-        joinRoomUserInfo(roomUid, userId, imLiveBroadcastRoomVo);
+        joinRoomUserInfo(roomUid, userId, imLiveBroadcastRoomVo,microphoneFlag);
     }
 
     /**
@@ -1458,6 +1464,9 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
      * @param imLiveBroadcastRoomVo ImLiveBroadcastRoomVo
      */
     private void joinRoomUserInfo(String roomUid, Integer userId, ImLiveBroadcastRoomVo imLiveBroadcastRoomVo) {
+        joinRoomUserInfo(roomUid, userId, imLiveBroadcastRoomVo,true);
+    }
+    private void joinRoomUserInfo(String roomUid, Integer userId, ImLiveBroadcastRoomVo imLiveBroadcastRoomVo,Boolean microphoneFlag) {
 
         //记录用户当前房间uid
         redissonClient.getBucket(LIVE_USER_ROOM.replace(USER_ID, userId.toString())).set(roomUid, 12L, TimeUnit.HOURS);
@@ -1480,13 +1489,14 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
             if (Objects.isNull(liveRoomMember)) {
 
                 // 初次进入房间
-                getLiveRoomUserInfo(userId, imLiveBroadcastRoomVo);
+                getLiveRoomUserInfo(userId, imLiveBroadcastRoomVo, microphoneFlag);
             } else {
                 // 更新直播间用户信息
                 ImLiveBroadcastRoomMember roomMember = new ImLiveBroadcastRoomMember();
                 roomMember.setId(liveRoomMember.getId());
                 roomMember.setOnlineStatus(1);
                 roomMember.setLiveRoomStatus(1);
+                roomMember.setMicrophoneFlag(microphoneFlag);
 
                 liveBroadcastRoomMemberService.updateById(roomMember);
             }
@@ -1538,7 +1548,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         ImLiveBroadcastRoomVo roomVo = getVisitorLiveBroadcastRoomVo(roomUid);
 
         // 加入直播间用户信息
-        joinRoomUserInfo(roomUid, userId, roomVo);
+        joinRoomUserInfo(roomUid, userId, roomVo,false);
     }
 
     /**
@@ -1842,6 +1852,10 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
      */
     @NotNull
     private RoomUserInfoVo getLiveRoomUserInfo(Integer userId, ImLiveBroadcastRoomVo imLiveBroadcastRoomVo) {
+        return getLiveRoomUserInfo(userId, imLiveBroadcastRoomVo,true);
+
+    }
+    private RoomUserInfoVo getLiveRoomUserInfo(Integer userId, ImLiveBroadcastRoomVo imLiveBroadcastRoomVo,Boolean microphoneFlag) {
 
         RoomUserInfoVo userInfo = getUserInfo(userId);
         userInfo.setFirstJoinTime(DateTime.now().toDate());
@@ -1857,6 +1871,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         roomMember.setOnlineStatus(1);
         roomMember.setBanStatus(0);
         roomMember.setLiveRoomStatus(1);
+        roomMember.setMicrophoneFlag(microphoneFlag);
 
         // 保存直播间用户信息
         liveBroadcastRoomMemberService.save(roomMember);

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomMemberMapper.xml

@@ -36,7 +36,8 @@
             su.organ_id_ AS organId,
             a.join_time_ as joinTime,
             a.total_time_ as totalViewTime,
-            if(ib.user_id_ is null, 0, 1) as blackFlag
+            if(ib.user_id_ is null, 0, 1) as blackFlag,
+            a.microphone_flag_ as microphoneFlag
         from
             im_live_broadcast_room_member as a
             left join sys_user as su on su.id_ = a.user_id_

+ 5 - 2
mec-student/src/main/java/com/ym/mec/student/controller/ImLiveBroadcastRoomController.java

@@ -56,8 +56,11 @@ public class ImLiveBroadcastRoomController extends BaseController {
 
     @ApiOperation("学生-进入房间")
     @GetMapping("/joinRoom")
-    public HttpResponseResult<Object> joinRoom(String roomUid, Integer userId) {
-        imLiveBroadcastRoomService.joinRoom(roomUid, userId);
+    public HttpResponseResult<Object> joinRoom(String roomUid, Integer userId,Boolean microphoneFlag) {
+        if (microphoneFlag == null) {
+            microphoneFlag = true;
+        }
+        imLiveBroadcastRoomService.joinRoom(roomUid, userId,microphoneFlag);
         return succeed();
     }