shangke 2 years ago
parent
commit
3199d5f234

+ 588 - 0
.idea/httpRequests/http-requests-log.http

@@ -0,0 +1,588 @@
+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-12T183529.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
+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
+
+###
+
+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-11T204659.200.json
+
+###
+
+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-11T204644.200.json
+
+###
+
+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-11T204620.200.json
+
+###
+
+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-11T204529.200.json
+
+###
+
+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-11T204510.200.json
+
+###
+
+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-11T203037.200.json
+
+###
+
+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-11T203024.200.json
+
+###
+
+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-11T203016.200.json
+
+###
+
+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-11T202954.200.json
+
+###
+
+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-11T202704.200.json
+
+###
+
+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-11T202141.200.json
+
+###
+
+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-11T202117.200.json
+
+###
+
+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-11T201906.200.json
+
+###
+
+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-11T201829.200.json
+
+###
+
+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-11T201306.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 127
+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",
+  "smsCode": "666666"
+}
+
+<> 2023-05-10T212648.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 104
+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"
+}
+
+<> 2023-05-10T212627.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/cooperation
+Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
+Proxy-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
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/cooperation
+Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
+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
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/cooperation
+Authorization: bearer ae333169-e0f2-4fc3-adc1-08048fd77196
+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
+
+###
+
+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
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-05-10T201707.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
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-05-10T201654.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/cooperation
+Authorization: bearer 7d12c468-e8cf-4e81-bc56-a9de18ba8fc5
+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
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 104
+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"
+}
+
+<> 2023-05-10T155616.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 104
+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"
+}
+
+<> 2023-05-10T154304.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 104
+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"
+}
+
+<> 2023-05-10T154238.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 104
+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"
+}
+
+<> 2023-05-10T154216.200.json
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+tenantid: 1
+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
+
+###
+
+GET http://127.0.0.1:8006/news/list?type=29
+Authorization: bearer e50cd2ae-3fad-4b3a-93ce-c86689cae2dc
+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
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 101
+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
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 101
+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": "18682475901"
+}
+
+<> 2023-05-09T163843.200.json
+
+###
+
+POST http://127.0.0.1:8001/smsLogin?clientId=EDUCATION&clientSecret=EDUCATION&deviceNum=&phone=15907121011&smsCode=666666
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-05-09T162346.200.json
+
+###
+
+POST http://127.0.0.1:8001/smsLogin?clientId=EDUCATION&clientSecret=EDUCATION&deviceNum=&phone=15907121011&smsCode=666666
+Content-Type: application/x-www-form-urlencoded
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-05-09T162057.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/getAllStaffs
+Authorization: bearer 8b2589c4-da6a-4cf8-b061-92bcaa6b6ddc
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T185236.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/getAllStaffs
+Authorization: bearer 8b2589c4-da6a-4cf8-b061-92bcaa6b6ddc
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T184524.200.json
+
+###
+
+GET http://127.0.0.1:8005/open/school/cooperation?id=3
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T174953.200.json
+
+###
+
+POST http://127.0.0.1:8005/open/school/staffSave
+Content-Type: application/json
+Content-Length: 101
+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": "18682475959"
+}
+
+<> 2023-05-08T162159.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/queryUserInfo
+Authorization: bearer 8b2589c4-da6a-4cf8-b061-92bcaa6b6ddc
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T161647.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/queryUserInfo
+Authorization: bearer 8b2589c4-da6a-4cf8-b061-92bcaa6b6ddc
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T155712.200.json
+
+###
+
+GET http://127.0.0.1:8005/schoolStaff/queryUserInfo
+Authorization: 515c41b5-f967-4206-aefa-c5add17007d7
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-05-08T155604.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
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-05-08T155551.200.json
+
+###
+

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ImLiveBroadcastRoomMemberDao.java

@@ -60,5 +60,19 @@ public interface ImLiveBroadcastRoomMemberDao extends BaseMapper<ImLiveBroadcast
      * @param roomUid 房间id
      */
     RoomMemberNumDto queryMemberNum(@Param("roomUid") String roomUid);
+
+    /**
+     * 学后报名乐团
+     * @param studentIds 学生编号
+     * @return List<ImLiveBroadcastRoomMemberVo>
+     */
+    List<ImLiveBroadcastRoomMemberVo> selectStudentMusicGroup(@Param("studentIds") List<Integer> studentIds);
+
+    /**
+     * 学生声部
+     * @param studentIds 学生编号
+     * @return List<ImLiveBroadcastRoomMemberVo>
+     */
+    List<ImLiveBroadcastRoomMemberVo> selectStudentSubject(@Param("studentIds") List<Integer> studentIds);
 }
 

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

@@ -38,6 +38,9 @@ public class ImLiveBroadcastRoomMemberVo implements java.io.Serializable {
     
     @ApiModelProperty(value = "分部")
     private String organName;
+
+    @ApiModelProperty("机构编号")
+    private Integer organId;
     
     @ApiModelProperty(value = "乐团")
     private String musicGroupName;
@@ -55,10 +58,38 @@ public class ImLiveBroadcastRoomMemberVo implements java.io.Serializable {
     @ApiModelProperty(value = "是否黑名单")
     private boolean blackFlag;
 
+    @ApiModelProperty("游客凭据")
+    private String fingerprint;
+
     public ImLiveBroadcastRoomSimpleMemberVo getSimpleMemberVo(ImLiveBroadcastRoomMemberVo memberVo) {
         return JSON.parseObject(JSON.toJSONString(memberVo), ImLiveBroadcastRoomSimpleMemberVo.class);
     }
 
+    public ImLiveBroadcastRoomMemberVo roomTitle(String roomTitle) {
+        this.roomTitle = roomTitle;
+        return this;
+    }
+
+    public ImLiveBroadcastRoomMemberVo speakerName(String speakerName) {
+        this.speakerName = speakerName;
+        return this;
+    }
+
+    public ImLiveBroadcastRoomMemberVo subName(String subName) {
+        this.subName = subName;
+        return this;
+    }
+
+    public ImLiveBroadcastRoomMemberVo organName(String organName) {
+        this.organName = organName;
+        return this;
+    }
+
+    public ImLiveBroadcastRoomMemberVo musicGroupName(String musicGroupName) {
+        this.musicGroupName = musicGroupName;
+        return this;
+    }
+
     public static class ImLiveBroadcastRoomSimpleMemberVo {
 
         @ApiModelProperty(value = "学生头像")
@@ -226,4 +257,22 @@ public class ImLiveBroadcastRoomMemberVo implements java.io.Serializable {
 	public void setMusicGroupName(String musicGroupName) {
 		this.musicGroupName = musicGroupName;
 	}
+
+    public String getFingerprint() {
+        return fingerprint;
+    }
+
+    public void setFingerprint(String fingerprint) {
+        this.fingerprint = fingerprint;
+    }
+
+    public Integer getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(Integer organId) {
+        this.organId = organId;
+    }
+
+
 }

+ 87 - 13
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomMemberServiceImpl.java

@@ -1,26 +1,32 @@
 package com.ym.mec.biz.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ImLiveBroadcastRoomMemberDao;
-import com.ym.mec.biz.dal.dto.LiveRoomStatus;
+import com.ym.mec.biz.dal.dao.OrganizationDao;
+import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoom;
 import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoomMember;
+import com.ym.mec.biz.dal.entity.Organization;
 import com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomDetailVo;
 import com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomMemberVo;
-import com.ym.mec.biz.service.ImLiveBroadcastRoomDataService;
-import com.ym.mec.biz.service.ImLiveBroadcastRoomMemberService;
-import com.ym.mec.biz.service.ImLiveRoomVideoService;
+import com.ym.mec.biz.service.*;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageUtil;
 import com.ym.mec.common.page.WrapperUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -29,15 +35,22 @@ import java.util.stream.Collectors;
  * @author hgw
  * @since 2022-02-21 14:26:59
  */
+@Slf4j
 @Service("imLiveBroadcastRoomMemberService")
 public class ImLiveBroadcastRoomMemberServiceImpl extends ServiceImpl<ImLiveBroadcastRoomMemberDao, ImLiveBroadcastRoomMember> implements ImLiveBroadcastRoomMemberService {
 
-    private final static Logger log = LoggerFactory.getLogger(ImLiveBroadcastRoomMemberServiceImpl.class);
-
     @Autowired
     private ImLiveBroadcastRoomDataService imLiveBroadcastRoomDataService;
     @Autowired
     private ImLiveRoomVideoService imLiveRoomVideoService;
+    @Autowired
+    private SysConfigService sysConfigService;
+    @Autowired
+    private ImLiveBroadcastRoomService imLiveBroadcastRoomService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+    @Autowired
+    private OrganizationDao organizationDao;
 
     @Override
     public ImLiveBroadcastRoomMemberDao getDao() {
@@ -58,13 +71,74 @@ public class ImLiveBroadcastRoomMemberServiceImpl extends ServiceImpl<ImLiveBroa
     @Override
     public PageInfo<ImLiveBroadcastRoomMemberVo> queryRoomMember(Map<String, Object> param) {
         Page<ImLiveBroadcastRoomMemberVo> pageInfo = PageUtil.getPageInfo(param);
-        return PageUtil.pageInfo(baseMapper.queryMemberPage(pageInfo, param));
+
+        IPage<ImLiveBroadcastRoomMemberVo> page = baseMapper.queryMemberPage(pageInfo, param);
+
+        List<ImLiveBroadcastRoomMemberVo> records = page.getRecords();
+
+        if (CollectionUtils.isNotEmpty(records)) {
+
+            // 游客默认头像
+            String defaultAvatar = Optional.ofNullable(sysConfigService.findByParamName(SysConfigService.VISITOR_DEFAULT_AVATAR)
+                            .getParanValue()).orElse("");
+
+            String roomUid = MapUtils.getString(param, "roomUid", RandomStringUtils.random(5));
+            // 直播间信息
+            ImLiveBroadcastRoom room = imLiveBroadcastRoomService.lambdaQuery()
+                    .eq(ImLiveBroadcastRoom::getRoomUid, roomUid)
+                    .last("LIMIT 1")
+                    .one();
+            if (Objects.isNull(room)) {
+                throw new BizException("直播间不存在");
+            }
+            // 直播间主讲老师
+            SysUser speaker = sysUserFeignService.queryUserById(room.getSpeakerId());
+
+            // 机构名称
+            List<Integer> organIds = records.stream()
+                    .map(ImLiveBroadcastRoomMemberVo::getOrganId).distinct().collect(Collectors.toList());
+
+            Map<Integer, String> organMap = organizationDao.findOrgans(organIds).stream()
+                    .collect(Collectors.toMap(Organization::getId, Organization::getName, (o, n) -> n));
+
+            List<Integer> studentIds = records.stream()
+                    .filter(x -> StringUtils.isNotBlank(x.getFingerprint()))
+                    .map(ImLiveBroadcastRoomMemberVo::getStudentId)
+                    .filter(Objects::nonNull)
+                    .distinct().collect(Collectors.toList());
+
+            // 学生报名乐团
+            Map<Integer, String> musicGroupMap = baseMapper.selectStudentMusicGroup(studentIds).stream()
+                    .collect(Collectors.toMap(ImLiveBroadcastRoomMemberVo::getStudentId, ImLiveBroadcastRoomMemberVo::getMusicGroupName, (o, n) -> n));
+
+            // 学生声部名称
+            Map<Integer, String> subjectMap = baseMapper.selectStudentSubject(studentIds).stream()
+                    .collect(Collectors.toMap(ImLiveBroadcastRoomMemberVo::getStudentId, ImLiveBroadcastRoomMemberVo::getSubName, (o, n) -> n));
+
+            for (ImLiveBroadcastRoomMemberVo item : records) {
+
+                if (StringUtils.isNotEmpty(item.getFingerprint())) {
+                    // 设置游客默认头像
+                    item.setAvatar(defaultAvatar);
+                } else {
+                    // 设置默认数据
+                    item.subName(subjectMap.getOrDefault(item.getStudentId(), ""))
+                            .organName(organMap.getOrDefault(item.getOrganId(), ""))
+                            .musicGroupName(musicGroupMap.getOrDefault(item.getStudentId(), ""))
+                            .roomTitle(room.getRoomTitle())
+                            .setSpeakerName(speaker.getRealName());
+                }
+
+            }
+        }
+
+        return PageUtil.pageInfo(page);
     }
 
     /**
      * 查询在房间人员
      *
-     * @param roomUid
+     * @param roomUid 直播间编号
      */
     @Override
     public List<Integer> getLiveRoomMember(String roomUid) {

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

@@ -30,9 +30,11 @@
         tu.real_name_ speakerName,
         a.user_id_ as studentId,
         a.whether_mic_status_ as whetherMicStatus,
+        a.fingerprint_ as fingerprint,
         IFNULL(su.username_, a.visitor_name_) as studentName,
         su.avatar_ as avatar,
         su.phone_ as phone,
+        su.organ_id_ AS organId,
         b.name_ as subName,
         o.name_ organName,
         GROUP_CONCAT(distinct mg.name_) musicGroupName,
@@ -40,12 +42,12 @@
         a.total_time_ as totalViewTime,
         if(ib.user_id_ is null, 0, 1) as blackFlag
         from im_live_broadcast_room_member as a
-        left join im_live_broadcast_room as i on a.room_uid_ = i.room_uid_
         left join sys_user as su on su.id_ = a.user_id_
-        left join student st on su.id_ = st.user_id_
 		LEFT JOIN student_registration sr ON sr.user_id_ = a.user_id_
 		LEFT JOIN music_group mg ON  mg.id_ = sr.music_group_id_
+        left join student st on su.id_ = st.user_id_
         left join subject as b on st.subject_id_list_ = b.id_
+        left join im_live_broadcast_room as i on a.room_uid_ = i.room_uid_
 		left join `sys_user` tu on tu.`id_` = i.`speaker_id_` 
 		LEFT JOIN `organization` o on o.`id_` = su.`organ_id_`
         left join im_live_room_black ib on ib.room_uid_ = a.room_uid_ and ib.user_id_ = a.user_id_
@@ -100,4 +102,24 @@
         where room_uid_ = #{roomUid}
         group by room_uid_
     </select>
+
+    <!--学后报名乐团-->
+    <select id="selectStudentMusicGroup" resultType="com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomMemberVo">
+        select
+            sr.user_id_ as studentId, GROUP_CONCAT(distinct mg.name_) musicGroupName
+        from
+            student_registration sr LEFT JOIN music_group mg ON  mg.id_ = sr.music_group_id_
+        WHERE sr.user_id_ IN (<foreach collection="studentIds" separator="," item="item">#{item}</foreach>)
+    </select>
+    <!--学后报名乐团-->
+
+    <!--学生声部信息-->
+    <select id="selectStudentSubject" resultType="com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomMemberVo">
+        SELECT
+            st.user_id_ as studentId, b.name_ as subName
+        FROM
+            left join student st left join subject as b on st.subject_id_list_ = b.id_
+        WHERE st.user_id_ IN (<foreach collection="studentIds" separator="," item="item">#{item}</foreach>)
+    </select>
+    <!--学生声部信息-->
 </mapper>