wangwei 5 lat temu
rodzic
commit
2e488069fb

+ 10 - 0
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -28,6 +28,7 @@ import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.helpers.DynamicEnum;
 import cn.com.qmth.examcloud.commons.helpers.DynamicEnumManager;
 import cn.com.qmth.examcloud.commons.helpers.poi.ExcelReader;
+import cn.com.qmth.examcloud.commons.util.BooleanUtil;
 import cn.com.qmth.examcloud.commons.util.DateUtil;
 import cn.com.qmth.examcloud.commons.util.DateUtil.DatePatterns;
 import cn.com.qmth.examcloud.commons.util.PathUtil;
@@ -438,6 +439,15 @@ public class ExamServiceImpl implements ExamService {
 		Long studentId = examSpecialInfo.getStudentId();
 		Long courseId = examSpecialInfo.getCourseId();
 
+		if (null != orgId && null == courseId && null == studentId) {
+
+		}
+
+		int trueNum = BooleanUtil.countTrue(null != orgId, null != courseId, null != studentId);
+		if (1 < trueNum) {
+			throw new StatusException("001502", "参数错误");
+		}
+
 		// 上锁
 		Object[] locker = new Object[]{"E_EXAM_SPECIAL_SETTINGS", examId};
 		SequenceLockHelper.getLock(locker);