|
@@ -202,6 +202,18 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
return PageUtil.of(iPage);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<PaperVo> list(Long examId, User user) {
|
|
|
+ ExamEntity exam=examService.getById(examId);
|
|
|
+ if(exam==null) {
|
|
|
+ throw new StatusException("未找到考试批次");
|
|
|
+ }
|
|
|
+ if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(exam.getSchoolId())) {
|
|
|
+ throw new StatusException("没有权限");
|
|
|
+ }
|
|
|
+ return this.baseMapper.list(examId);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|