|
@@ -859,6 +859,7 @@ public class ExamServiceImpl implements ExamService {
|
|
|
pages.getList().forEach(e->{
|
|
|
ExamIpLimitInfo domain = new ExamIpLimitInfo();
|
|
|
BeanUtils.copyProperties(e,domain);
|
|
|
+ domain.setLimitType(e.getLimitType() == null ? "" : e.getLimitType().getName());
|
|
|
Optional<ExamEntity> byId = examRepo.findById(examId);
|
|
|
byId.ifPresent(examEntity -> domain.setExamName(examEntity.getName()));
|
|
|
list.add(domain);
|
|
@@ -893,7 +894,7 @@ public class ExamServiceImpl implements ExamService {
|
|
|
Integer totalLimit = getExamLimitProperty(examId, ipTotalLimit.getId(), 0);
|
|
|
if (totalLimit == 1) {
|
|
|
//在白名单中
|
|
|
- int count = examIpLimitRepo.countByExamIdAndLimitTypeAndIp(examId, IpLimitType.Has_access.getId(),realIp);
|
|
|
+ int count = examIpLimitRepo.countByExamIdAndLimitTypeAndIp(examId, IpLimitType.HAS_ACCESS.getId(),realIp);
|
|
|
if (count>0) {
|
|
|
//学习中心访问控制
|
|
|
Integer centerLimit = getExamLimitProperty(examId,ipCenterLimit.getId(), 0);
|
|
@@ -926,7 +927,7 @@ public class ExamServiceImpl implements ExamService {
|
|
|
}
|
|
|
} else {
|
|
|
//不在黑名单中
|
|
|
- int count = examIpLimitRepo.countByExamIdAndLimitTypeAndIp(examId,IpLimitType.No_Access.getId(), realIp);
|
|
|
+ int count = examIpLimitRepo.countByExamIdAndLimitTypeAndIp(examId,IpLimitType.NO_ACCESS.getId(), realIp);
|
|
|
return count > 0;
|
|
|
}
|
|
|
return true;
|