|
|
@@ -37,12 +37,15 @@ public class IpAnalyzeServiceImpl implements IpAnalyzeServiceInterface {
|
|
|
}
|
|
|
String responseBody = httpResponse.body();
|
|
|
log.info("ip解析result: {}", responseBody);
|
|
|
+ if (responseBody == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(responseBody);
|
|
|
if (jsonObject.getInt("ret") == 200) {
|
|
|
return jsonObject.getJSONObject("data");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error("ip解析异常", e);
|
|
|
+ log.warn("ip解析异常", e);
|
|
|
}
|
|
|
return null;
|
|
|
}
|