|
|
@@ -417,4 +417,22 @@ public class EaiService implements SubsystemService {
|
|
|
|
|
|
return requestBody;
|
|
|
}
|
|
|
+
|
|
|
+ public JSONObject findDetailAssignment(int assignmentId, String type) {
|
|
|
+ StringBuilder uri = new StringBuilder(eaiHost);
|
|
|
+ if(type.equals("写作")){
|
|
|
+ uri.append("/api/assignment/byAssignment/"+assignmentId);
|
|
|
+ } else if(type.equals("口语")){
|
|
|
+ uri.append("/api/aispeaking/byAssignment/"+ assignmentId);
|
|
|
+ }
|
|
|
+ String token = httpService.getToken();
|
|
|
+ try{
|
|
|
+ String result = httpService.sendGet(uri.toString(), null, token);
|
|
|
+ System.out.println(result);
|
|
|
+ return JSON.parseObject(result);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ return new JSONObject().fluentPut("查询作业详情异常,",e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|