فهرست منبع

app接口提交

weiwenhai 6 سال پیش
والد
کامیت
ca4cd3279e

+ 6 - 0
src/main/java/cn/com/qmth/examcloud/app/controller/PracticeExamRestController.java

@@ -161,4 +161,10 @@ public class PracticeExamRestController {
     		@RequestParam Long examId, @RequestParam String groupCode, @RequestParam String questionId) throws Exception {
         return questionPoolService.getQuestion(key, token, courseCode, examId, groupCode, questionId);
     }
+    
+    @ApiOperation(value = "获取冻结时间")
+    @RequestMapping(value = "/exam/practice/getFreezeTime", method = {RequestMethod.GET, RequestMethod.POST})
+    public Result getFreezeTime(@RequestHeader String key, @RequestHeader String token, @RequestParam Long examId) throws Exception {
+        return examAdminService.getFreezeTime(key, token, examId);
+    }
 }

+ 11 - 0
src/main/java/cn/com/qmth/examcloud/app/service/ExamAdminService.java

@@ -49,5 +49,16 @@ public interface ExamAdminService {
      * @throws Exception
      */
     Result getBeforeExamRemark(String key, String token, Long examId,String type) throws Exception;
+    
+    /**
+     * 
+     * 获取冻结时间
+     * @param key
+     * @param token
+     * @param examId
+     * @return
+     * @throws Exception
+     */
+    Result getFreezeTime(String key, String token, Long examId) throws Exception;
 
 }

+ 12 - 0
src/main/java/cn/com/qmth/examcloud/app/service/impl/ExamAdminServiceImpl.java

@@ -69,4 +69,16 @@ public class ExamAdminServiceImpl implements ExamAdminService {
         return result;
 	}
 
+	@Override
+	public Result getFreezeTime(String key, String token, Long examId) throws Exception {
+		//封装请求参数
+        final String requestUrl = String.format("%s/api/ecs_exam_work/exam/examOrgProperty/%s/FREEZE_TIME", propertyService.getExamAdminUrl(), examId);
+        Result<String> result = HttpUtils.doGet(requestUrl, key, token);
+        if (result.isSuccess()) {
+            //过滤掉为空的属性
+            result.setData(HttpUtils.filterNullAttributes(result.getData()));
+        }
+        return result;
+	}
+
 }