WANG 6 years ago
parent
commit
8a28f95afe

+ 9 - 1
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamController.java

@@ -329,11 +329,19 @@ public class ExamController extends ControllerSupport {
 			}
 			if (StringUtils.isNotBlank(examTypes)) {
 				List<String> examTypeList = RegExpUtil.findAll(examTypes, "\\w+");
+
+				List<ExamType> etList = Lists.newArrayList();
+				for (String cur : examTypeList) {
+					etList.add(ExamType.valueOf(cur));
+				}
+
 				if (10 < examTypeList.size()) {
 					throw new StatusException("E-001120", "too many examTypes");
 				}
 
-				predicates.add(root.get("examType").in(examTypeList));
+				if (CollectionUtils.isNotEmpty(etList)) {
+					predicates.add(root.get("examType").in(etList));
+				}
 			}
 
 			if (null != studentId) {