|
|
@@ -181,7 +181,7 @@ public class CoderService implements SubsystemService {
|
|
|
JSONObject requestBody = new JSONObject(examDTO);
|
|
|
String result = null;
|
|
|
try {
|
|
|
- result = httpService.sendPost(coderUrlPrefix+"/exam",requestBody, token);
|
|
|
+ result = httpService.sendPost(coderUrlPrefix+"/exam", requestBody, token);
|
|
|
} catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -221,6 +221,22 @@ public class CoderService implements SubsystemService {
|
|
|
return JSON.parseObject(result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 加入Coder考试
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public JSONObject joinCoderExam(int examId) {
|
|
|
+ String token = httpService.getToken();
|
|
|
+ String result = null;
|
|
|
+ try {
|
|
|
+ result = httpService.sendPost(coderUrlPrefix+"/exam/"+examId+"/join", null, token);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return JSON.parseObject(result);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 根据id获得Coder的考试信息
|