|
@@ -84,19 +84,23 @@ public class RoomController{
|
|
|
|
|
|
@RequestMapping(value = "/statusSync")
|
|
|
public void statusSync(@RequestBody String body) throws Exception {
|
|
|
- ChannelStateNotify notify = JSONObject.parseObject(body, ChannelStateNotify.class);
|
|
|
- log.info("statusSyncParam: {}",JSONObject.toJSON(notify));
|
|
|
- String roomId = notify.getChannelId();
|
|
|
- String userId = notify.getUserId();
|
|
|
- switch (notify.getEvent()){
|
|
|
- case 11:
|
|
|
- //成员加入
|
|
|
- roomService.joinRoomSuccess(roomId, userId,null);
|
|
|
- break;
|
|
|
- case 12:
|
|
|
- //成员退出
|
|
|
- roomService.leaveRoomSuccess(roomId, userId,null);
|
|
|
- break;
|
|
|
+ try {
|
|
|
+ ChannelStateNotify notify = JSONObject.parseObject(body, ChannelStateNotify.class);
|
|
|
+ log.info("statusSyncParam: {}",JSONObject.toJSON(notify));
|
|
|
+ String roomId = notify.getChannelId();
|
|
|
+ String userId = notify.getUserId();
|
|
|
+ switch (notify.getEvent()){
|
|
|
+ case 11:
|
|
|
+ //成员加入
|
|
|
+ roomService.joinRoomSuccess(roomId, userId,null);
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
+ //成员退出
|
|
|
+ roomService.leaveRoomSuccess(roomId, userId,null);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error(e.getLocalizedMessage());
|
|
|
}
|
|
|
}
|
|
|
|