Эх сурвалжийг харах

将课程id改为课程代码

lideyin 5 жил өмнө
parent
commit
06e9ea311c

+ 3 - 8
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamQuestionOuterServiceProvider.java

@@ -221,8 +221,8 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
             throw new StatusException("103001", "考试记录id不允许为空");
         }
 
-        if (null == req.getCourseId()) {
-            throw new StatusException("103002", "课程id不允许为空");
+        if (null == req.getCourseCode()) {
+            throw new StatusException("103002", "课程代码不允许为空");
         }
 
         if (StringUtils.isNullOrEmpty(req.getPaperType())) {
@@ -233,13 +233,8 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
             throw new StatusException("103004", "原始试卷id不允许为空");
         }
 
-        CourseCacheBean course = CacheHelper.getCourse(req.getCourseId());
-        if (null == course) {
-            throw new StatusException("103005", "课程id不正确");
-        }
-
         ExtractConfigPaperCacheBean extractConfigPaper = CacheHelper.getExtractConfigPaper(req.getExamId(),
-                course.getCode(), req.getPaperType(), req.getBasePaperId());
+                req.getCourseCode(), req.getPaperType(), req.getBasePaperId());
 
         OuterGetPaperStructResp resp = new OuterGetPaperStructResp();
         if (null != extractConfigPaper.getDefaultPaper()) {

+ 6 - 6
examcloud-exchange-outer-api/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/request/OuterGetPaperStructReq.java

@@ -16,8 +16,8 @@ public class OuterGetPaperStructReq extends EnterpriseRequest {
     @ApiModelProperty(value = "考试id", example = "123", required = true)
     private Long examId;
 
-    @ApiModelProperty(value = "课程id", example = "123", required = true)
-    private Long courseId;
+    @ApiModelProperty(value = "课程代码", example = "123", required = true)
+    private String courseCode;
 
     @ApiModelProperty(value = "卷型", example = "123", required = true)
     private String paperType;
@@ -33,12 +33,12 @@ public class OuterGetPaperStructReq extends EnterpriseRequest {
         this.examId = examId;
     }
 
-    public Long getCourseId() {
-        return courseId;
+    public String getCourseCode() {
+        return courseCode;
     }
 
-    public void setCourseId(Long courseId) {
-        this.courseId = courseId;
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
     }
 
     public String getPaperType() {