xiatian 10 月之前
父节点
当前提交
d890e9fe8c

+ 1 - 1
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/ExamIpLimitRepo.java

@@ -30,6 +30,6 @@ public interface ExamIpLimitRepo extends JpaRepository<ExamIpLimitEntity, Long>,
 
 	List<ExamIpLimitEntity> findByExamIdAndIp(Long examId, String ip);
 	
-	List<ExamIpLimitEntity> findByExamIdAndLimitType(Long examId, String limitType);
+	List<ExamIpLimitEntity> findByExamIdAndLimitType(Long examId, IpLimitType limitType);
 
 }

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

@@ -924,7 +924,7 @@ public class ExamServiceImpl implements ExamService {
     }
     
     private boolean checkInIpConfig(String realIp, Long examId,IpLimitType type) {
-    	List <ExamIpLimitEntity> ips=examIpLimitRepo.findByExamIdAndLimitType(examId, type.name());
+    	List <ExamIpLimitEntity> ips=examIpLimitRepo.findByExamIdAndLimitType(examId, type);
     	if(CollectionUtils.isEmpty(ips)) {
     		return false;
     	}