zouxuan 3 lat temu
rodzic
commit
56ab666322

+ 17 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkBaseDto.java

@@ -0,0 +1,17 @@
+package com.yonge.cooleshow.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class ImNetworkBaseDto {
+
+    @ApiModelProperty(value = "房间号(课程编号)",required = true)
+    private Long roomId;
+
+    public Long getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(Long roomId) {
+        this.roomId = roomId;
+    }
+}

+ 37 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkMusicSheetDto.java

@@ -0,0 +1,37 @@
+package com.yonge.cooleshow.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class ImNetworkMusicSheetDto extends ImNetworkBaseDto{
+
+    @ApiModelProperty(value = "伴奏编号",required = true)
+    private Long accompanimentId;
+
+    @ApiModelProperty(value = "伴奏下载状态(1下载成功0下载中2下载失败)",required = true)
+    private Integer status;
+
+    public Long getAccompanimentId() {
+        return accompanimentId;
+    }
+
+    public void setAccompanimentId(Long accompanimentId) {
+        this.accompanimentId = accompanimentId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    @Override
+    public String toString() {
+        return "ImNetworkMusicSheetDto{" +
+                "accompanimentId=" + accompanimentId +
+                "roomId=" + getRoomId() +
+                ", status=" + status +
+                '}';
+    }
+}

+ 0 - 11
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkRoomResult.java

@@ -20,9 +20,6 @@ public class ImNetworkRoomResult extends ImNetworkRoom {
     @ApiModelProperty(value = "当前用户")
     private ImNetworkRoomMember roomMember;
 
-    @ApiModelProperty(value = "当前用户伴奏信息")
-    private List<CourseScheduleStudentMusicSheetResult> musicSheetResults;
-
     @ApiModelProperty(value = "节拍器参数")
     private ImNetworkCustomMessage midiJson = new ImNetworkCustomMessage();
 
@@ -65,12 +62,4 @@ public class ImNetworkRoomResult extends ImNetworkRoom {
     public void setRoomMember(ImNetworkRoomMember roomMember) {
         this.roomMember = roomMember;
     }
-
-    public List<CourseScheduleStudentMusicSheetResult> getMusicSheetResults() {
-        return musicSheetResults;
-    }
-
-    public void setMusicSheetResults(List<CourseScheduleStudentMusicSheetResult> musicSheetResults) {
-        this.musicSheetResults = musicSheetResults;
-    }
 }

+ 13 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/ImNetworkRoomMember.java

@@ -5,11 +5,13 @@ import java.util.Date;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.yonge.cooleshow.biz.dal.dto.CourseScheduleStudentMusicSheetResult;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.baomidou.mybatisplus.annotation.TableId;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * 网络教室成员(ImNetworkRoomMember)表实体类
@@ -67,6 +69,17 @@ public class ImNetworkRoomMember implements Serializable {
     @ApiModelProperty(value = "是否举手")
     private boolean handFlag;
 
+    @ApiModelProperty(value = "当前用户伴奏信息")
+    private List<CourseScheduleStudentMusicSheetResult> musicSheetResults;
+
+    public List<CourseScheduleStudentMusicSheetResult> getMusicSheetResults() {
+        return musicSheetResults;
+    }
+
+    public void setMusicSheetResults(List<CourseScheduleStudentMusicSheetResult> musicSheetResults) {
+        this.musicSheetResults = musicSheetResults;
+    }
+
     public String getUsername() {
         return username;
     }

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/ImNetworkRoomService.java

@@ -38,7 +38,7 @@ public interface ImNetworkRoomService extends IService<ImNetworkRoom> {
     void sendImPlayMidiMessage(ImNetworkCustomMessage customMessage) throws Exception;
 
     //老师通知学员下载伴奏
-    void pushDownloadMusicSheetMsg(String roomId,Long accompanimentId) throws Exception;
+    void pushDownloadMusicSheetMsg(ImNetworkMusicSheetDto musicSheetDto) throws Exception;
 
     //移动端用来渲染页面
     void display(ImNetworkDisplayDataDto displayData) throws Exception;
@@ -56,7 +56,7 @@ public interface ImNetworkRoomService extends IService<ImNetworkRoom> {
     void rejectControlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception;
 
     //学员伴奏下载状态回调
-    void musicSheetDownNotify(String roomId, Long accompanimentId, Integer status) throws Exception;
+    void musicSheetDownNotify(ImNetworkMusicSheetDto musicSheetDto) throws Exception;
 
     //学员设备状态同步
     void deviceStatusSync(ImNetworkDeviceControlDto deviceStatusSync) throws Exception;

+ 39 - 21
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImNetworkRoomServiceImpl.java

@@ -102,14 +102,16 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
         //如果是老师,重置节拍器数据
         if(userRole == UserRoleEnum.TEACHER){
             courseScheduleStudentPaymentService.getDao().cleanPlayMidi(courseScheduleId);
+            //获取所有学员的伴奏下载详情
+            setMusicSheetList(roomMemberList,courseScheduleId);
         }else {
             //获取节拍器信息
             joinRoomResult.setMidiJson(courseScheduleStudentPaymentService.getMemberMidi(courseScheduleId,sysUser.getUserId()));
         }
-        //获取用户已下载的伴奏列表
-        List<CourseScheduleStudentMusicSheetResult> musicSheetResults = courseScheduleStudentMusicSheetService.getDao().
-                queryBySheetIdAndCourseId(null,courseScheduleId,sysUser.getUserId(),null,null);
-        joinRoomResult.setMusicSheetResults(musicSheetResults);
+//        //获取用户已下载的伴奏列表
+//        List<CourseScheduleStudentMusicSheetResult> musicSheetResults = courseScheduleStudentMusicSheetService.getDao().
+//                queryBySheetIdAndCourseId(null,courseScheduleId,sysUser.getUserId(),null,null);
+//        joinRoomResult.setMusicSheetResults(musicSheetResults);
         //课程结束后关闭教室的时间
         String autoCloseNetworkRoomTime = sysConfigDao.findConfigValue(SysConfigConstant.DESTROY_EXPIRED_PRACTICE_ROOM_MINUTE);
         joinRoomResult.setAutoCloseNetworkRoomTime(autoCloseNetworkRoomTime);
@@ -124,6 +126,21 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
         return HttpResponseResult.succeed(joinRoomResult);
     }
 
+    private void setMusicSheetList(List<ImNetworkRoomMember> roomMemberList,Long courseScheduleId){
+        List<CourseScheduleStudentMusicSheetResult> musicSheetResults = courseScheduleStudentMusicSheetService.getDao().
+                queryBySheetIdAndCourseId(null,courseScheduleId,null,null,null);
+        if (!CollectionUtils.isEmpty(musicSheetResults)) {
+            //分组塞到学员列表中
+            Map<Long, List<CourseScheduleStudentMusicSheetResult>> musicSheetResultMap = musicSheetResults.stream().
+                    collect(Collectors.groupingBy(e -> e.getUserId()));
+            roomMemberList.forEach(e -> {
+                if (musicSheetResultMap.containsKey(e.getUserId())) {
+                    e.setMusicSheetResults(musicSheetResultMap.get(e.getUserId()));
+                }
+            });
+        }
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void joinRoomSuccess(String roomId,Long userId) throws Exception {
@@ -254,11 +271,12 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void pushDownloadMusicSheetMsg(String roomId,Long accompanimentId) throws Exception {
+    public void pushDownloadMusicSheetMsg(ImNetworkMusicSheetDto musicSheetDto) throws Exception {
+        Long courseScheduleId = Optional.ofNullable(musicSheetDto).map(ImNetworkBaseDto::getRoomId).orElseThrow(() -> new BizException("房间编号不能为空"));
+        Long accompanimentId = Optional.ofNullable(musicSheetDto).map(ImNetworkMusicSheetDto::getAccompanimentId).orElseThrow(() -> new BizException("伴奏编号不能为空"));
         Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
                 map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
-        Long courseScheduleId = Long.parseLong(roomId);
         List<CourseScheduleStudentMusicSheetResult> scheduleStudentMusicSheetResults = courseScheduleStudentMusicSheetService.getDao().
                 queryBySheetIdAndCourseId(accompanimentId, courseScheduleId, null, null, 0);
 
@@ -286,7 +304,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
         }
         ImNetworkMusicSheetDownloadMessage msg = new ImNetworkMusicSheetDownloadMessage(
                 JSON.parseObject(JSON.toJSONString(accompaniment), ImNetworkMusicSheetDownloadMessageContent.class));
-        imHelper.publishMessage(userId.toString(), roomId, msg, 0);
+        imHelper.publishMessage(userId.toString(), courseScheduleId.toString(), msg, 0);
     }
 
     @Override
@@ -561,28 +579,28 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void musicSheetDownNotify(String roomId, Long accompanimentId, Integer status) throws Exception {
-        log.info("musicSheetDownNotify: roomId={},accompanimentId={},status={}", roomId,accompanimentId,status);
+    public void musicSheetDownNotify(ImNetworkMusicSheetDto musicSheetDto) throws Exception {
+        Long roomId = Optional.ofNullable(musicSheetDto).map(ImNetworkBaseDto::getRoomId).orElseThrow(() -> new BizException("房间编号不能为空"));
+        Long accompanimentId = Optional.ofNullable(musicSheetDto).map(ImNetworkMusicSheetDto::getAccompanimentId).orElseThrow(() -> new BizException("伴奏编号不能为空"));
+        Integer status = Optional.ofNullable(musicSheetDto).map(ImNetworkMusicSheetDto::getStatus).orElseThrow(() -> new BizException("伴奏下载状态不能为空"));
+        log.info("musicSheetDownNotify: musicSheetDto={}", musicSheetDto);
         Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
                 map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
-        Long scheduleId = Long.parseLong(roomId);
-        List<CourseScheduleStudentMusicSheetResult> studentMusicSheetResults = courseScheduleStudentMusicSheetService.getDao().queryBySheetIdAndCourseId(accompanimentId, scheduleId,userId, null, null);
+        List<CourseScheduleStudentMusicSheetResult> studentMusicSheetResults = courseScheduleStudentMusicSheetService.getDao().queryBySheetIdAndCourseId(accompanimentId, roomId,userId, null, null);
         if(CollectionUtils.isEmpty(studentMusicSheetResults)){
             return;
         }
-        if (accompanimentId != null) {
-            Optional.ofNullable(musicSheetAccompanimentService.getById(accompanimentId)).
-                    orElseThrow(()-> new BizException("曲目信息不存在"));
-            //修改下载状态
-            CourseScheduleStudentMusicSheetResult musicSheetResult = studentMusicSheetResults.get(0);
-            musicSheetResult.setDownStatus(status);
-            courseScheduleStudentMusicSheetService.updateById(musicSheetResult);
-        }
+        Optional.ofNullable(musicSheetAccompanimentService.getById(accompanimentId)).
+                orElseThrow(()-> new BizException("曲目信息不存在"));
+        //修改下载状态
+        CourseScheduleStudentMusicSheetResult musicSheetResult = studentMusicSheetResults.get(0);
+        musicSheetResult.setDownStatus(status);
+        courseScheduleStudentMusicSheetService.updateById(musicSheetResult);
         //给老师发送学员曲目下载状态
-        CourseSchedule courseSchedule = courseScheduleService.getById(scheduleId);
+        CourseSchedule courseSchedule = courseScheduleService.getById(roomId);
         ImNetworkMusicSheetDownloadStatusMessage statusMessage = new ImNetworkMusicSheetDownloadStatusMessage(status,studentMusicSheetResults);
-        imHelper.publishMessage(userId.toString(), courseSchedule.getTeacherId().toString(), roomId, statusMessage);
+        imHelper.publishMessage(userId.toString(), courseSchedule.getTeacherId().toString(), roomId.toString(), statusMessage);
     }
 
     //校验用户是否提前进入教室

+ 37 - 46
cooleshow-user/user-classroom/src/main/java/com/yonge/cooleshow/classroom/controller/ImNetworkRoomController.java

@@ -3,19 +3,18 @@ package com.yonge.cooleshow.classroom.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.yonge.cooleshow.biz.dal.dto.*;
-import com.yonge.cooleshow.biz.dal.enums.UserRoleEnum;
 import com.yonge.cooleshow.biz.dal.service.ImNetworkRoomService;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.toolset.base.exception.BizException;
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.Optional;
@@ -39,12 +38,11 @@ public class ImNetworkRoomController extends BaseController {
     private ImNetworkRoomService imNetworkRoomService;
 
     @ApiOperation("加入网络教室")
-    @PostMapping(value = "/join", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    @ApiImplicitParam(name = "roomId", dataType = "Long", value = "课程编号")
-    public HttpResponseResult<ImNetworkRoomResult> joinRoom(Long roomId) throws Exception {
-        roomId = Optional.ofNullable(roomId)
-                .orElseThrow(()->new BizException("房间号不可为空"));
-        return imNetworkRoomService.joinRoom(roomId);
+    @PostMapping(value = "/join")
+    public HttpResponseResult<ImNetworkRoomResult> joinRoom(@RequestBody ImNetworkBaseDto imNetworkBaseDto) throws Exception {
+        return imNetworkRoomService.joinRoom(Optional.ofNullable(imNetworkBaseDto)
+                .map(ImNetworkBaseDto::getRoomId)
+                .orElseThrow(()->new BizException("房间号不可为空")));
     }
 
 //    @ApiOperation("加入网络教室状态回调")
@@ -55,10 +53,11 @@ public class ImNetworkRoomController extends BaseController {
 //    }
 
     @ApiOperation("加入网络教室状态回调")
-    @PostMapping(value = "joinRoomFailure", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult joinRoomFailure(Long roomId){
-        roomId = Optional.ofNullable(roomId).orElseThrow(()->new BizException("房间号不可为空"));
-        imNetworkRoomService.joinRoomFailure(roomId.toString());
+    @PostMapping(value = "joinRoomFailure")
+    public HttpResponseResult joinRoomFailure(@RequestBody ImNetworkBaseDto imNetworkBaseDto){
+        imNetworkRoomService.joinRoomFailure(Optional.ofNullable(imNetworkBaseDto)
+                .map(ImNetworkBaseDto::getRoomId)
+                .orElseThrow(()->new BizException("房间号不可为空")).toString());
         return succeed();
     }
 
@@ -80,37 +79,37 @@ public class ImNetworkRoomController extends BaseController {
     }
 
     @ApiOperation("退出网络教室")
-    @ApiImplicitParam(name = "roomId", dataType = "Long", value = "课程编号")
-    @PostMapping(value = "/leave", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult leaveRoom(Long roomId) throws Exception {
-        roomId = Optional.ofNullable(roomId).orElseThrow(()->new BizException("房间号不可为空"));
-        imNetworkRoomService.leaveRoom(roomId.toString());
+    @PostMapping(value = "/leave")
+    public HttpResponseResult leaveRoom(@RequestBody ImNetworkBaseDto imNetworkBaseDto) throws Exception {
+        imNetworkRoomService.leaveRoom(Optional.ofNullable(imNetworkBaseDto)
+                .map(ImNetworkBaseDto::getRoomId)
+                .orElseThrow(()->new BizException("房间号不可为空")).toString());
         return succeed();
     }
 
     @ApiOperation("控制学员节拍器")
-    @PostMapping(value = "/sendImPlayMidiMessage", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/sendImPlayMidiMessage")
     public HttpResponseResult sendImPlayMidiMessage(@RequestBody ImNetworkCustomMessage customMessage) throws Exception {
         imNetworkRoomService.sendImPlayMidiMessage(customMessage);
         return succeed();
     }
 
     @ApiOperation("移动端用来渲染页面")
-    @PostMapping(value = "/display", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/display")
     public HttpResponseResult display(@RequestBody ImNetworkDisplayDataDto displayData) throws Exception {
         imNetworkRoomService.display(displayData);
         return succeed();
     }
 
     @ApiOperation(value = "批量控制学员设备开关")
-    @PostMapping(value = "/device/batchControl", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/device/batchControl")
     public Object batchControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)throws Exception {
         imNetworkRoomService.batchControlDevice(deviceControl);
         return succeed();
     }
 
     @ApiOperation(value = "控制学员设备开关")
-    @PostMapping(value = "/device/control", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/device/control")
     public HttpResponseResult controlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)
             throws Exception {
         imNetworkRoomService.controlDevice(deviceControl);
@@ -118,7 +117,7 @@ public class ImNetworkRoomController extends BaseController {
     }
 
     @ApiOperation(value = "学员同意打开,麦克风、摄像头")
-    @PostMapping(value = "/device/approve", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/device/approve")
     public HttpResponseResult approveControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl) throws Exception {
         deviceControl.setEnable(true);
         imNetworkRoomService.approveControlDevice(deviceControl);
@@ -126,7 +125,7 @@ public class ImNetworkRoomController extends BaseController {
     }
 
     @ApiOperation(value = "学员拒绝打开,麦克风、摄像头")
-    @PostMapping(value = "/device/reject", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/device/reject")
     public HttpResponseResult rejectControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)
             throws Exception {
         deviceControl.setEnable(false);
@@ -135,41 +134,33 @@ public class ImNetworkRoomController extends BaseController {
     }
 
     @ApiOperation(value = "学员设备状态同步")
-    @PostMapping(value = "/device/sync", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+    @PostMapping(value = "/device/sync")
     public Object deviceStatusSync(@RequestBody ImNetworkDeviceControlDto deviceControl)
             throws Exception {
         imNetworkRoomService.deviceStatusSync(deviceControl);
         return succeed();
     }
 
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "roomId", dataType = "String", value = "房间号",required = true),
-            @ApiImplicitParam(name = "accompanimentId", dataType = "Long", value = "伴奏编号",required = true)
-    })
     @ApiOperation(value = "老师在网络教室选择完伴奏后、通知学员下载伴奏")
-    @PostMapping(value = "pushDownloadMusicSheetMsg", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult pushDownloadMusicSheetMsg(String roomId,Long accompanimentId) throws Exception {
-        imNetworkRoomService.pushDownloadMusicSheetMsg(roomId,accompanimentId);
+    @PostMapping(value = "pushDownloadMusicSheetMsg")
+    public HttpResponseResult pushDownloadMusicSheetMsg(@RequestBody ImNetworkMusicSheetDto musicSheetDto) throws Exception {
+        imNetworkRoomService.pushDownloadMusicSheetMsg(musicSheetDto);
         return succeed();
     }
 
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "roomId", dataType = "String", value = "房间号",required = true),
-            @ApiImplicitParam(name = "accompanimentId", dataType = "Long", value = "伴奏编号",required = false),
-            @ApiImplicitParam(name = "status", dataType = "Integer", value = "伴奏下载状态(1下载成功0下载中2下载失败)",required = true)
-    })
     @ApiOperation(value = "学员伴奏下载状态回调")
-    @PostMapping(value = "musicSheetDownNotify", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult adjustMusicScore(String roomId,Long accompanimentId,Integer status) throws Exception {
-        imNetworkRoomService.musicSheetDownNotify(roomId,accompanimentId,status);
+    @PostMapping(value = "musicSheetDownNotify")
+    public HttpResponseResult adjustMusicScore(@RequestBody ImNetworkMusicSheetDto musicSheetDto) throws Exception {
+        imNetworkRoomService.musicSheetDownNotify(musicSheetDto);
         return succeed();
     }
 
-    @ApiImplicitParam(name = "roomId", dataType = "Long", value = "房间号",required = true)
     @ApiOperation(value = "查询不在教室的学员")
-    @PostMapping(value = "/queryNoJoinStu", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult queryNoJoinStu(Long roomId){
-        return succeed(imNetworkRoomService.queryNoJoinStu(roomId));
+    @PostMapping(value = "/queryNoJoinStu")
+    public HttpResponseResult queryNoJoinStu(@RequestBody ImNetworkBaseDto imNetworkBaseDto){
+        return succeed(imNetworkRoomService.queryNoJoinStu(Optional.ofNullable(imNetworkBaseDto)
+                .map(ImNetworkBaseDto::getRoomId)
+                .orElseThrow(()->new BizException("房间号不可为空"))));
     }
 }