Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

Joburgess 5 vuotta sitten
vanhempi
commit
21a7dfbf88

+ 2 - 1
edu-im/edu-im-server/src/main/java/com/keao/edu/im/pojo/RoomResult.java

@@ -44,7 +44,7 @@ public class RoomResult {
         int curPg;
     }
 
-    public void setMembers(List<RoomMember> roomMemberList) {
+    public void setMembers(List<RoomMember> roomMemberList,String shieldUserId) {
         for (RoomMember member : roomMemberList) {
             MemberResult result = new MemberResult();
             result.setUserId(member.getUid());
@@ -55,6 +55,7 @@ public class RoomResult {
             result.setUserName(member.getName());
             result.setHandUp(member.isHand());
             result.setHeadUrl(member.getHeadUrl());
+            result.setShieldUserId(shieldUserId);
             members.add(result);
         }
     }

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

@@ -113,7 +113,7 @@ public class RoomServiceImpl implements RoomService {
         imHelper.stopRecord(userId,roomId);
     }
 
-    @Override
+    /*@Override
     public RoomResult joinRecorded(Long examRegistrationId) throws Exception {
         StudentExamResultApiDto examResult = eduUserFeignService.getExamResult(examRegistrationId);
 //        String roomId = examResult.getRoomId();
@@ -158,10 +158,10 @@ public class RoomServiceImpl implements RoomService {
         }
         if (memberList.isEmpty()) {
             saveRoomMember(userId,sysUser.getAvatar(), realName, recordedRoomId, Student.getValue(), true,true, date,examRegistrationId);
-            /*IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, recordedRoomId, recordedRoomId);
+            *//*IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, recordedRoomId, recordedRoomId);
             if (!resultInfo.isSuccess()) {
                 throw new ApiException(ErrorEnum.ERR_CREATE_ROOM_ERROR, resultInfo.getErrorMessage());
-            }*/
+            }*//*
             userResult.setMicrophone(true);
             userResult.setCamera(true);
             userResult.setHandUp(false);
@@ -208,7 +208,7 @@ public class RoomServiceImpl implements RoomService {
             this.publishMessage(eduUserFeignService.getPublishMessage(examRegistrationId));
         }
         return roomResult;
-    }
+    }*/
 
     private BaseResponse getBaseResponse(BaseResponse baseResponse){
         baseResponse.setErrCode(500);
@@ -357,7 +357,7 @@ public class RoomServiceImpl implements RoomService {
         }
         roomResult.setExamFlag(examRoom.getExamFlag());
         List<RoomMember> roomMembers = roomMemberDao.findByRid(roomId);
-        roomResult.setMembers(roomMembers);
+        roomResult.setMembers(roomMembers,examRoom.getShieldUserId());
 //        List<Whiteboard> whiteboardList = whiteboardDao.findByRid(roomId);
 //        roomResult.setWhiteboards(whiteboardList);
         log.info("join success: roomId = {}, userId = {}, userName={}, role = {}", roomId, userId, roleEnum);

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

@@ -94,7 +94,7 @@ public interface RoomService {
      * 开始录播
      * @param examRegistrationId
      */
-    RoomResult joinRecorded(Long examRegistrationId) throws Exception;
+//    RoomResult joinRecorded(Long examRegistrationId) throws Exception;
 
     /**
      * 结束录播

+ 4 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamReviewServiceImpl.java

@@ -24,6 +24,7 @@ import com.keao.edu.user.page.ExamReviewRecordQueryInfo;
 import com.keao.edu.user.service.ExamReviewService;
 import com.keao.edu.user.service.ExamRoomStudentRelationService;
 import com.keao.edu.util.collection.MapUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
@@ -112,6 +113,9 @@ public class ExamReviewServiceImpl extends BaseServiceImpl<Long, ExamReview> imp
 	@Override
 	@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
 	public void add(ExamReview examReview) {
+		if(StringUtils.isEmpty(examReview.getEvaluationContent()) || examReview.getEvaluationResult() == null){
+			throw new BizException("评审失败:请完整填写评审内容");
+		}
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		sysUserDao.lockUser(sysUser.getId());
 		Long examRegistrationId = examReview.getExamRegistrationId();