2 Commits ade0be12ab ... af868d8b4d

Author SHA1 Message Date
  wuwen af868d8b4d Merge branch 'master' of http://47.112.200.206:3000/shenhao/sys 3 years ago
  wuwen bf68b1be89 api 3 years ago
1 changed files with 4 additions and 26 deletions
  1. 4 26
      src/main/java/com/ssj/api/request/RequestOpenApiUtils.java

+ 4 - 26
src/main/java/com/ssj/api/request/RequestOpenApiUtils.java

@@ -55,9 +55,8 @@ public class RequestOpenApiUtils {
 	
 	public static JSONObject openApiServiceRecognitionResult(String homeworkPictureId,String accessToken) {
 		try {
-			//String host=PropertiesUtil.getValue("API_OPEN_URL");
-			//String accessToken=createOpenToken(appid, accessKey);
-			String url="https://master.sharingschool.com/sz/api/kmt/homeworkCorrect/V2/recognitionResult?accessToken="+accessToken;
+			String host=PropertiesUtil.getValue("API_OPEN_URL");
+			String url=host+"/api/kmt/homeworkCorrect/V2/recognitionResult?accessToken="+accessToken;
 			
 			JSONObject json=new JSONObject();
 			json.put("homeworkPictureId", homeworkPictureId);
@@ -81,12 +80,11 @@ public class RequestOpenApiUtils {
 	
 	public static JSONArray openApiServiceAnswerList(JSONObject json,String accessToken) {
 		try {
-			//String host=PropertiesUtil.getValue("API_OPEN_URL");
-			//String accessToken=createOpenToken(appid, accessKey);
+			String host=PropertiesUtil.getValue("API_OPEN_URL");
 			if(json==null) {
 				return null;
 			}
-			String url="https://master.sharingschool.com/sz/api/kmt/homeworkCorrect/V2/answerList?accessToken="+accessToken;
+			String url=host+"/api/kmt/homeworkCorrect/V2/answerList?accessToken="+accessToken;
 			logger.info("调用第三方接口【openApiServiceAnswerList】,请求URL:"+url);
 			logger.info("调用第三方接口【openApiServiceAnswerList】,请求参数:"+json);
 			String text=HttpRemote.POSTMethod(url, json.toJSONString());
@@ -102,24 +100,4 @@ public class RequestOpenApiUtils {
 		return null;
 	}
 	
-	
-	
-	public static void main(String[] args) {
-		String homeworkPictureId="20210302450448243884597248";
-		String accessToken="14DF5C279E734453ABA929744F81A833";
-		JSONObject json=openApiServiceRecognitionResult(homeworkPictureId, accessToken);
-		System.out.println(json);
-		json.put("homeworkPictureId", homeworkPictureId);
-		
-		JSONArray json1=openApiServiceAnswerList(json, accessToken);
-		System.out.println(json1);
-		
-		
-	}
-	
-	
-
-	
-	
-
 }