@@ -131,6 +131,11 @@ public class CoursePaperServiceImpl implements CoursePaperService {
}
if (paperP == 0) {
throw new StatusException(PRT_CODE_500, "试卷页数不能为0!");
+ } else {
+ //试卷页数为奇数时加一
+ if (paperP % 2 != 0) {
+ paperP++;
+ }
CoursePaper oldCoursePaper = coursePaperRepository.findByExamIdAndPaperId(coursePaper.getExamId(), coursePaper.getPaperId());