zouxuan 5 years ago
parent
commit
6e022b4eb8
1 changed files with 8 additions and 21 deletions
  1. 8 21
      mec-im/src/main/java/com/ym/controller/RoomController.java

+ 8 - 21
mec-im/src/main/java/com/ym/controller/RoomController.java

@@ -4,15 +4,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.ym.common.ApiException;
 import com.ym.common.BaseResponse;
 import com.ym.common.ErrorEnum;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.CourseScheduleDao;
-import com.ym.mec.biz.dal.dao.CoursesGroupDao;
-import com.ym.mec.biz.dal.dao.TeacherDao;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.entity.CoursesGroup;
-import com.ym.mec.biz.dal.entity.Teacher;
-import com.ym.mec.biz.dal.enums.SignStatusEnum;
-import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
 import com.ym.pojo.*;
 import com.ym.service.RoomService;
 import lombok.extern.slf4j.Slf4j;
@@ -30,10 +21,6 @@ import java.util.List;
 public class RoomController{
     @Autowired
     RoomService roomService;
-    @Autowired
-    private TeacherDao teacherDao;
-    @Autowired
-    private CourseScheduleDao courseScheduleDao;
 
     @RequestMapping(value = "/join", method = RequestMethod.POST)
     public Object joinRoom(@RequestBody ReqUserData data)
@@ -57,14 +44,14 @@ public class RoomController{
         if(notify.getEvent() == 12 || notify.getEvent() == 3){
             result = roomService.statusSync(notify.getChannelId(), notify.getUserId());
         }else if(notify.getEvent() == 11){
-            Teacher teacher = teacherDao.get(Integer.parseInt(notify.getUserId()));
-            Long roomId = Long.parseLong(notify.getChannelId().substring(1));
-            CourseSchedule courseSchedule = courseScheduleDao.get(roomId);
-            if(teacher != null && teacher.getId().equals(courseSchedule.getActualTeacherId())){
-                roomService.joinRoom(teacher.getRealName(),roomId.toString(),false,false);
-            }else {
-                roomService.joinRoom(teacher.getUsername(),roomId.toString(),false,false);
-            }
+//            Teacher teacher = teacherDao.get(Integer.parseInt(notify.getUserId()));
+//            Long roomId = Long.parseLong(notify.getChannelId().substring(1));
+//            CourseSchedule courseSchedule = courseScheduleDao.get(roomId);
+//            if(teacher != null && teacher.getId().equals(courseSchedule.getActualTeacherId())){
+//                roomService.joinRoom(teacher.getRealName(),roomId.toString(),false,false);
+//            }else {
+//                roomService.joinRoom(teacher.getUsername(),roomId.toString(),false,false);
+//            }
         }
         return new BaseResponse<>(result);
     }