|
@@ -36,24 +36,6 @@ public class RoomController{
|
|
|
return roomService.joinRoom(data.getRegistrationId(), data.isAudience(), data.isDisableCamera(),data.isMusicMode(),data.getRoomId());
|
|
|
}
|
|
|
|
|
|
- /*@RequestMapping(value = "/joinRecorded", method = RequestMethod.POST)
|
|
|
- public Object joinRecorded(Long registrationId)
|
|
|
- throws Exception {
|
|
|
- return new BaseResponse<>(roomService.joinRecorded(registrationId));
|
|
|
- }*/
|
|
|
-
|
|
|
- /*@RequestMapping(value = "/levelRecorded", method = RequestMethod.POST)
|
|
|
- public Object levelRecorded(Long registrationId)
|
|
|
- throws Exception {
|
|
|
- return new BaseResponse<>(roomService.levelRecorded(registrationId));
|
|
|
- }*/
|
|
|
-
|
|
|
- /*@RequestMapping(value = "/startRecord", method = RequestMethod.POST)
|
|
|
- public Object startRecord(String roomId) throws Exception {
|
|
|
- roomService.startRecord(roomId);
|
|
|
- return new BaseResponse<>();
|
|
|
- }*/
|
|
|
-
|
|
|
@RequestMapping(value = "/joinGroup", method = RequestMethod.POST)
|
|
|
public Object joinGroup(String userIds, String groupId, String groupName) throws Exception {
|
|
|
roomService.joinGroup(userIds,groupId,groupName);
|
|
@@ -74,17 +56,11 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/leave", method = RequestMethod.POST)
|
|
|
public Object leaveRoom(@RequestBody ReqUserData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result = roomService.leaveRoom(data.getRegistrationId(),data.getRoomId(),null);
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
- /*@RequestMapping(value = "/sendImPlayMidiMessage", method = RequestMethod.POST)
|
|
|
- public Object sendImPlayMidiMessage(@RequestBody PlayMidiMessageData playMidiMessageData) throws Exception {
|
|
|
- roomService.sendImPlayMidiMessage(playMidiMessageData);
|
|
|
- return new BaseResponse<>();
|
|
|
- }*/
|
|
|
-
|
|
|
@RequestMapping(value = "/statusSync")
|
|
|
public Object statusSync(@RequestBody String body) throws Exception {
|
|
|
ChannelStateNotify notify = JSONObject.parseObject(body, ChannelStateNotify.class);
|
|
@@ -95,7 +71,7 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/downgrade", method = RequestMethod.POST)
|
|
|
public Object downRole(@RequestBody ReqChangeUserRoleData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result = roomService.downgrade(data.getRoomId(), data.getUsers());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
@@ -107,7 +83,7 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/kick", method = RequestMethod.POST)
|
|
|
public Object kickMember(@RequestBody ReqUserData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result = roomService.kickMember(data);
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
@@ -118,39 +94,9 @@ public class RoomController{
|
|
|
return new BaseResponse<>();
|
|
|
}
|
|
|
|
|
|
- //only teacher
|
|
|
- /*@RequestMapping(value = "/display", method = RequestMethod.POST)
|
|
|
- public Object display(@RequestBody ReqDisplayData data)
|
|
|
- throws ApiException, Exception {
|
|
|
- boolean result = roomService.display(data.getRoomId(), data.getType(), data.getUri());
|
|
|
- return new BaseResponse<>(result);
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value = "/whiteboard/create", method = RequestMethod.POST)
|
|
|
- public Object createWhiteBoard(@RequestBody ReqWhiteboardData data)
|
|
|
- throws ApiException, Exception {
|
|
|
- String result = roomService.createWhiteBoard(data.getRoomId());
|
|
|
- return new BaseResponse<>(result);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @RequestMapping(value = "/whiteboard/delete", method = RequestMethod.POST)
|
|
|
- public Object destroyWhiteBoard(@RequestBody ReqWhiteboardData data)
|
|
|
- throws ApiException, Exception {
|
|
|
- boolean result = roomService.deleteWhiteboard(data.getRoomId(), data.getWhiteboardId());
|
|
|
- return new BaseResponse<>(result);
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value = "/whiteboard/list", method = RequestMethod.GET)
|
|
|
- public Object getWhiteBoard(@RequestParam String roomId)
|
|
|
- throws ApiException, Exception {
|
|
|
- List<RoomResult.WhiteboardResult> whiteboards = roomService.getWhiteboard(roomId);
|
|
|
- return new BaseResponse<>(whiteboards);
|
|
|
- }*/
|
|
|
-
|
|
|
@RequestMapping(value = "/device/approve", method = RequestMethod.POST)
|
|
|
public Object approveControlDevice(@RequestBody ReqDeviceControlData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result;
|
|
|
result = roomService.approveControlDevice(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
@@ -158,7 +104,7 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/device/reject", method = RequestMethod.POST)
|
|
|
public Object rejectControlDevice(@RequestBody ReqDeviceControlData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result;
|
|
|
result = roomService.rejectControlDevice(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
@@ -166,7 +112,7 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/device/control", method = RequestMethod.POST)
|
|
|
public Object controlDevice(@RequestBody ReqDeviceControlData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result;
|
|
|
if (data.getCameraOn() != null) {
|
|
|
result = roomService.controlDevice(data.getRoomId(), data.getUserId(), DeviceTypeEnum.Camera, data.getCameraOn());
|
|
@@ -189,7 +135,7 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/device/sync", method = RequestMethod.POST)
|
|
|
public Object syncDeviceState(@RequestBody ReqDeviceControlData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result;
|
|
|
if (data.getCameraOn() != null) {
|
|
|
result = roomService.syncDeviceState(data.getRoomId(), DeviceTypeEnum.Camera, data.getCameraOn());
|
|
@@ -205,14 +151,14 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/whiteboard/turn-page", method = RequestMethod.POST)
|
|
|
public Object turnPage(@RequestBody ReqWhiteboardData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
boolean result = roomService.turnWhiteBoardPage(data.getRoomId(), data.getWhiteboardId(), data.getPage());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/members", method = RequestMethod.GET)
|
|
|
public Object getMembers(@RequestParam String roomId)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
List<RoomResult.MemberResult> whiteboards = roomService.getMembers(roomId);
|
|
|
return new BaseResponse<>(whiteboards);
|
|
|
}
|
|
@@ -226,49 +172,49 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/speech/approve", method = RequestMethod.POST)
|
|
|
public Object approval(@RequestBody ReqSpeechData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.approveSpeech(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/speech/reject", method = RequestMethod.POST)
|
|
|
public Object reject(@RequestBody ReqSpeechData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.rejectSpeech(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/transfer", method = RequestMethod.POST)
|
|
|
public Object transfer(@RequestBody ReqUpgradeRoleData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.transfer(data.getRoomId(), data.getUserId());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/upgrade/invite", method = RequestMethod.POST)
|
|
|
public Object inviteUpgradeRole(@RequestBody ReqUpgradeRoleData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.inviteUpgradeRole(data.getRoomId(), data.getUserId(), data.getRole());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/upgrade/approve", method = RequestMethod.POST)
|
|
|
public Object approveUpgradeRole(@RequestBody ReqUpgradeRoleData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.approveUpgradeRole(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/upgrade/reject", method = RequestMethod.POST)
|
|
|
public Object rejectUpgradeRole(@RequestBody ReqUpgradeRoleData data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.rejectUpgradeRole(data.getRoomId(), data.getTicket());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/change-role", method = RequestMethod.POST)
|
|
|
public Object changeRole(@RequestBody ReqChangeRole data)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.changeRole(data.getRoomId(), data.getUserId(), data.getRole());
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|
|
@@ -278,7 +224,7 @@ public class RoomController{
|
|
|
@RequestParam(value = "timestamp", required = false) String timestamp,
|
|
|
@RequestParam(value = "nonce", required = false) String nonce,
|
|
|
@RequestParam(value = "signature", required = false) String signature)
|
|
|
- throws ApiException, Exception {
|
|
|
+ throws Exception {
|
|
|
Boolean result = roomService.memberOnlineStatus(statusList, nonce, timestamp, signature);
|
|
|
return new BaseResponse<>(result);
|
|
|
}
|