|
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import cn.com.qmth.stmms.api.utils.AESUtil;
|
|
|
import cn.com.qmth.stmms.biz.api.auth.annotation.AuthValidate;
|
|
|
-import cn.com.qmth.stmms.biz.api.auth.exception.ExamNotAccessibleException;
|
|
|
+import cn.com.qmth.stmms.biz.api.auth.exception.ApiException;
|
|
|
import cn.com.qmth.stmms.biz.campus.model.Campus;
|
|
|
import cn.com.qmth.stmms.biz.campus.service.CampusService;
|
|
|
import cn.com.qmth.stmms.biz.exam.model.Exam;
|
|
@@ -47,7 +47,7 @@ import net.sf.json.JSONObject;
|
|
|
|
|
|
@Controller("examStudentApiController")
|
|
|
@RequestMapping("/api")
|
|
|
-public class ExamStudentController {
|
|
|
+public class ExamStudentController extends BaseApiController {
|
|
|
|
|
|
protected static Logger logger = LoggerFactory.getLogger(ExamStudentController.class);
|
|
|
|
|
@@ -88,7 +88,7 @@ public class ExamStudentController {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- throw new ExamNotAccessibleException();
|
|
|
+ throw ApiException.EXAM_NOT_ACCESSIBLED;
|
|
|
}
|
|
|
return array;
|
|
|
}
|
|
@@ -108,7 +108,7 @@ public class ExamStudentController {
|
|
|
return obj.getPicCount();
|
|
|
}
|
|
|
} else {
|
|
|
- throw new ExamNotAccessibleException();
|
|
|
+ throw ApiException.EXAM_NOT_ACCESSIBLED;
|
|
|
}
|
|
|
return -1;
|
|
|
}
|
|
@@ -564,7 +564,7 @@ public class ExamStudentController {
|
|
|
User user = RequestUtils.getApiUser(request);
|
|
|
Exam exam = examService.findById(examId);
|
|
|
if (exam == null || !exam.getSchoolId().equals(user.getSchoolId())) {
|
|
|
- throw new ExamNotAccessibleException();
|
|
|
+ throw ApiException.EXAM_NOT_ACCESSIBLED;
|
|
|
}
|
|
|
// 验证考生是否存在
|
|
|
ExamStudent student = examStudentService.findByExamIdAndExamNumber(examId, examNumber);
|