保存进度!

This commit is contained in:
2022-04-07 11:24:40 +08:00
parent 95b3ad8f1b
commit bc3b9b044f
2 changed files with 15 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
/**
* @author 王炜
* @version 1.0
*/
package com.cpic.xim.notify.disaster;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -12,6 +16,9 @@ import java.net.URL;
import java.net.HttpURLConnection;
import java.util.zip.GZIPInputStream;
/**
*
*/
public class WeatherDisasterWarningGrabber
{
private final static String QUERY_URL = "https://devapi.qweather.com/v7/warning/now?";
@@ -110,6 +117,12 @@ public class WeatherDisasterWarningGrabber
return json;
}
/**
* 将天气警告的json字符串转换成java对象。
* @param json json字符串
* @return 返回 QWeatherDisasterWarning 对象。
* @throws IOException
*/
public static QWeatherDisasterWarning convertWeatherDisasterWarning( String json )
throws IOException
{