保存进度!
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user