zouxuan 5 年之前
父節點
當前提交
2043435be6

+ 1 - 1
edu-im/edu-im-api/src/main/java/com/keao/edu/im/api/client/ImFeignService.java

@@ -150,5 +150,5 @@ public interface ImFeignService {
 	 * @return
 	 */
 	@PostMapping(value = "room/destroyRoom")
-	void destroyRoom(@RequestParam("roomId") Long roomId,@RequestParam("userId") String userId,@RequestParam("groupId") String groupId);
+	void destroyRoom(@RequestParam("roomId") Long roomId,@RequestParam("userId") String userId);
 }

+ 1 - 1
edu-im/edu-im-api/src/main/java/com/keao/edu/im/api/client/callback/ImFeignServiceFallback.java

@@ -89,7 +89,7 @@ public class ImFeignServiceFallback implements ImFeignService {
     }
 
     @Override
-    public void destroyRoom(Long roomId,String userId,String groupId) {
+    public void destroyRoom(Long roomId,String userId) {
 
     }
 /*

+ 2 - 2
edu-im/edu-im-server/src/main/java/com/keao/edu/im/controller/RoomController.java

@@ -115,8 +115,8 @@ public class RoomController{
     }
 
     @RequestMapping(value = "/destroyRoom", method = RequestMethod.POST)
-    public void kickMember(Long roomId,String userId,String groupId) throws Exception {
-        roomService.destroyRoom(roomId,userId,groupId);
+    public void kickMember(Long roomId,String userId) throws Exception {
+        roomService.destroyRoom(roomId,userId);
     }
 
     @RequestMapping(value = "/kick", method = RequestMethod.POST)

+ 2 - 3
edu-im/edu-im-server/src/main/java/com/keao/edu/im/service/Impl/RoomServiceImpl.java

@@ -665,8 +665,7 @@ public class RoomServiceImpl implements RoomService {
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    @Async
-    public void destroyRoom(Long roomId,String userId,String groupId) throws Exception {
+    public void destroyRoom(Long roomId,String userId) throws Exception {
 
         CheckUtils.checkArgument(roomId != null, "destroyRoom roomId must't be null");
         SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -697,7 +696,7 @@ public class RoomServiceImpl implements RoomService {
                 }
             });
             roomDao.deleteByRid(roomId.toString());
-            imHelper.dismiss(userId,groupId);
+            imHelper.dismiss(userId,roomId.toString());
         }
     }
 

+ 2 - 1
edu-im/edu-im-server/src/main/java/com/keao/edu/im/service/RoomService.java

@@ -5,6 +5,7 @@ import com.keao.edu.im.api.entity.ReqUserData;
 import com.keao.edu.im.common.ApiException;
 import com.keao.edu.im.common.BaseResponse;
 import com.keao.edu.im.pojo.*;
+import org.springframework.scheduling.annotation.Async;
 
 import java.io.IOException;
 import java.util.List;
@@ -31,7 +32,7 @@ public interface RoomService {
      * 销毁房间
      * @param roomId
      */
-    public void destroyRoom(Long roomId,String userId,String groupId) throws Exception;
+    public void destroyRoom(Long roomId,String userId) throws Exception;
 
     public Boolean kickMember(ReqUserData data) throws ApiException, Exception;
 

+ 3 - 3
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java

@@ -852,7 +852,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 			}
 //			imFeignService.dismissGroup(sysUser.getId().toString(),examRoomId.toString());
 			studentExamResultService.calculateStudentExamAvgScore(examRoomId);
-			imFeignService.destroyRoom(examRoomId,sysUser.getId().toString(),examRoomId.toString());
+			imFeignService.destroyRoom(examRoomId,sysUser.getId().toString());
 		}
 	}
 
@@ -868,7 +868,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		}
 		examRoom.setOpenFlag(0);
 //		imFeignService.dismissGroup(examRoom.getMainTeacherUserId().toString(),examRoomId.toString());
-		imFeignService.destroyRoom(examRoomId,examRoom.getMainTeacherUserId().toString(),examRoomId.toString());
+		imFeignService.destroyRoom(examRoomId,examRoom.getMainTeacherUserId().toString());
 		examRoomDao.update(examRoom);
 		studentExamResultService.calculateStudentExamAvgScore(examRoomId);
 		return BaseController.succeed();
@@ -884,7 +884,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		for (ExamRoom examRoom : examRooms) {
 			examRoom.setOpenFlag(0);
 //			imFeignService.dismissGroup(examRoom.getMainTeacherUserId().toString(),examRoom.getId().toString());
-			imFeignService.destroyRoom(examRoom.getId(),examRoom.getMainTeacherUserId().toString(),examRoom.getId().toString());
+			imFeignService.destroyRoom(examRoom.getId(),examRoom.getMainTeacherUserId().toString());
 			studentExamResultService.calculateStudentExamAvgScore(examRoom.getId());
 		}
 		examRoomDao.batchUpdate(examRooms);

+ 1 - 1
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRoomStudentRelationMapper.xml

@@ -223,7 +223,7 @@
 		LEFT JOIN sys_user su ON ersr.student_id_ = su.id_
 		LEFT JOIN student_exam_result ser ON ser.exam_registration_id_ = ersr.exam_registration_id_
 		WHERE ersr.exam_room_id_ = #{roomId} AND ser.is_finished_exam_ != 5
-		ORDER BY ersr.sign_in_time_ IS NULL,ser.is_finished_exam_ ASC,ersr.sign_in_time_ ASC
+		ORDER BY ersr.sign_in_time_ IS NULL,ser.is_finished_exam_ ASC,ersr.sign_in_time_ ASC,ersr.id_ ASC
 	</select>
     <select id="queryTotalNum" resultType="java.lang.Integer">
 		SELECT COUNT(ersr.id_) FROM exam_room_student_relation ersr