@@ -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);
}
@@ -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;