Browse Source

网络教室

zouxuan 2 years ago
parent
commit
034dadabdd

+ 5 - 5
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImChannelStateNotify.java

@@ -2,18 +2,18 @@ package com.yonge.cooleshow.biz.dal.dto;
 
 public class ImChannelStateNotify {
 	//房间号
-	private String channelId;
+	private String roomId;
 	//事件编号11是加入12是退出
 	private int event;
 	//用户编号
 	private String userId;
 
-	public String getChannelId() {
-		return channelId;
+	public String getRoomId() {
+		return roomId;
 	}
 
-	public void setChannelId(String channelId) {
-		this.channelId = channelId;
+	public void setRoomId(String roomId) {
+		this.roomId = roomId;
 	}
 
 	public int getEvent() {

+ 2 - 3
cooleshow-user/user-classroom/src/main/java/com/yonge/cooleshow/classroom/controller/ImNetworkRoomController.java

@@ -66,15 +66,14 @@ public class ImNetworkRoomController extends BaseController {
     public void statusSync(@RequestBody String body) throws Exception {
         log.info("statusSync body: {}",body);
         ImChannelStateNotify notify = JSONObject.parseObject(body, ImChannelStateNotify.class);
-        log.info("statusSyncParam: {}",JSONObject.toJSON(notify));
         switch (notify.getEvent()) {
             case 11:
                 //成员加入
-                imNetworkRoomService.joinRoomSuccess(notify.getChannelId(),Long.parseLong(notify.getUserId()));
+                imNetworkRoomService.joinRoomSuccess(notify.getRoomId(),Long.parseLong(notify.getUserId()));
                 break;
             case 12:
                 //成员退出
-                imNetworkRoomService.leaveRoomSuccess(notify.getChannelId(),Long.parseLong(notify.getUserId()));
+                imNetworkRoomService.leaveRoomSuccess(notify.getRoomId(),Long.parseLong(notify.getUserId()));
                 break;
         }
     }