|
@@ -176,14 +176,14 @@ public class ExamController extends ControllerSupport {
|
|
|
@RequestParam(required = true) Long courseId) {
|
|
|
|
|
|
if (null == examId) {
|
|
|
- throw new StatusException("E-001251", "examId is null");
|
|
|
+ throw new StatusException("001251", "examId is null");
|
|
|
}
|
|
|
if (null == courseId) {
|
|
|
- throw new StatusException("E-001252", "courseId is null");
|
|
|
+ throw new StatusException("001252", "courseId is null");
|
|
|
}
|
|
|
ExamEntity one = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == one) {
|
|
|
- throw new StatusException("E-001253", "examId is wrong");
|
|
|
+ throw new StatusException("001253", "examId is wrong");
|
|
|
}
|
|
|
|
|
|
validateRootOrgIsolation(one.getRootOrgId());
|
|
@@ -201,7 +201,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
ExamEntity one = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == one) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(one.getRootOrgId());
|
|
|
|
|
@@ -361,7 +361,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(etList)) {
|
|
|
if (10 < examTypeList.size()) {
|
|
|
- throw new StatusException("E-001120", "too many examTypes");
|
|
|
+ throw new StatusException("001120", "too many examTypes");
|
|
|
}
|
|
|
if (1 == examTypeList.size()) {
|
|
|
predicates.add(cb.equal(root.get("examType"), etList.get(0)));
|
|
@@ -452,7 +452,7 @@ public class ExamController extends ControllerSupport {
|
|
|
public ExamDomain getExamById(@PathVariable Long examId) {
|
|
|
ExamEntity one = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == one) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(one.getRootOrgId());
|
|
|
|
|
@@ -568,7 +568,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
@@ -595,7 +595,7 @@ public class ExamController extends ControllerSupport {
|
|
|
public String getExamProperty(@PathVariable Long examId, @PathVariable String key) {
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
DynamicEnumManager manager = ExamProperty.getDynamicEnumManager();
|
|
@@ -620,7 +620,7 @@ public class ExamController extends ControllerSupport {
|
|
|
User accessUser = getAccessUser();
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
@@ -642,12 +642,12 @@ public class ExamController extends ControllerSupport {
|
|
|
public String getExamOrgProperty(@PathVariable Long examId, @PathVariable Long orgId, @PathVariable String key) {
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
|
if (null == orgId) {
|
|
|
- throw new StatusException("E-001251", "orgId is null");
|
|
|
+ throw new StatusException("001251", "orgId is null");
|
|
|
}
|
|
|
|
|
|
GetOrgReq getOrgReq = new GetOrgReq();
|
|
@@ -895,11 +895,11 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
Long examId = examOrgDomain.getExamId();
|
|
|
if (null == examOrgDomain.getExamId()) {
|
|
|
- throw new StatusException("E-001210", "examId is null");
|
|
|
+ throw new StatusException("001210", "examId is null");
|
|
|
}
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
@@ -969,7 +969,7 @@ public class ExamController extends ControllerSupport {
|
|
|
User accessUser = getAccessUser();
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
@@ -1045,7 +1045,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
ExamEntity examEntity = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == examEntity) {
|
|
|
- throw new StatusException("E-001250", "examId is wrong");
|
|
|
+ throw new StatusException("001250", "examId is wrong");
|
|
|
}
|
|
|
validateRootOrgIsolation(examEntity.getRootOrgId());
|
|
|
|
|
@@ -1157,7 +1157,7 @@ public class ExamController extends ControllerSupport {
|
|
|
|
|
|
ExamEntity exam = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == exam) {
|
|
|
- throw new StatusException("E-001010", "考试不存在");
|
|
|
+ throw new StatusException("001010", "考试不存在");
|
|
|
}
|
|
|
|
|
|
validateRootOrgIsolation(exam.getRootOrgId());
|
|
@@ -1216,7 +1216,7 @@ public class ExamController extends ControllerSupport {
|
|
|
public Map<String, Object> ipLimit(HttpServletRequest request, @PathVariable Long examId) {
|
|
|
ExamEntity exam = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
|
|
|
if (null == exam) {
|
|
|
- throw new StatusException("E-001010", "考试不存在");
|
|
|
+ throw new StatusException("001010", "考试不存在");
|
|
|
}
|
|
|
|
|
|
Map<String, Object> map = Maps.newHashMap();
|