|
@@ -19,8 +19,11 @@ import java.util.Map;
|
|
|
@Log4j2
|
|
|
public class ResultUtils {
|
|
|
|
|
|
- /** 德源ip*/
|
|
|
- private static final String host = "https://testlife.eshimin.com";
|
|
|
+ /** 德源ip-测试*/
|
|
|
+// private static final String host = "https://testlife.eshimin.com";
|
|
|
+
|
|
|
+ /** 德源ip-正式*/
|
|
|
+ private static final String host = "https://life.eshimin.com";
|
|
|
|
|
|
private static final String publicKyeSign = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCTlOGDZQo9rkignZqZMN8JFC9OcnhiYOigLCVTrXhl6Z0ZD5bncnl9FRPPzgJBwf/3vl4LuWxcDzOK9w/pJ+v2D7uP/RPt3770Cv/dcG5vrUewV+IJ4qSkxwVkxeCS7r4c47kz22avMPo97OIdy6jed+/DDrbOIXbjQ7rl/AAs8QIDAQAB";
|
|
|
|
|
@@ -66,6 +69,7 @@ public class ResultUtils {
|
|
|
try {
|
|
|
HttpResponse httpResponse = HttpUtils.doGet(host, path, headers, querys);
|
|
|
String restResult = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
|
|
|
+ log.info("restResult: {}", restResult);
|
|
|
if (StringUtils.isNotEmpty(restResult)) {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(restResult, Feature.IgnoreNotMatch);
|
|
|
String code = jsonObject.getString("code");
|
|
@@ -76,12 +80,16 @@ public class ResultUtils {
|
|
|
String s = RSAUtils.decryptByPrivateKey(result, RSAUtils.getPrivateKey(privateKyeRes));
|
|
|
resultData = URLDecoder.decode(s, "utf-8");
|
|
|
}
|
|
|
+// else {
|
|
|
+//
|
|
|
+// return Result.failure(msg);
|
|
|
+// }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ log.info("result: {}", resultData);
|
|
|
return Result.success(JSONObject.parseObject(resultData));
|
|
|
}
|
|
|
|
|
@@ -137,7 +145,7 @@ public class ResultUtils {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ log.info("result: {}", resultData);
|
|
|
return JSONObject.parseObject(resultData);
|
|
|
}
|
|
|
|