保存进度!
This commit is contained in:
parent
4c0cb3c76e
commit
db8f9e9c05
@ -74,7 +74,7 @@ public class QWeatherDisasterWarning
|
|||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@JsonProperty( "updateTime")
|
@JsonProperty( "updateTime")
|
||||||
@JsonFormat( pattern = "yyyy-MM-dd\'T\'HH:mmXXX")
|
@JsonFormat( pattern = "yyyy-MM-dd'T'HH:mmXXX")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
@JsonProperty( "fxLink")
|
@JsonProperty( "fxLink")
|
||||||
|
@ -62,7 +62,7 @@ public class sendMessage
|
|||||||
// 拼接消息内容
|
// 拼接消息内容
|
||||||
String title = warningItem.getTitle();
|
String title = warningItem.getTitle();
|
||||||
String text = warningItem.getText();
|
String text = warningItem.getText();
|
||||||
String color = warningLevel.keySet().contains( warningItem.getLevel() )
|
String color = warningLevel.containsKey( warningItem.getLevel() )
|
||||||
? warningLevel.get( warningItem.getLevel() )
|
? warningLevel.get( warningItem.getLevel() )
|
||||||
: "#000000";
|
: "#000000";
|
||||||
requestBody = new StringBuilder();
|
requestBody = new StringBuilder();
|
||||||
@ -97,7 +97,6 @@ public class sendMessage
|
|||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
|
||||||
OracleConfig dbConfig = OracleConfigManager.getOracleConfig();
|
OracleConfig dbConfig = OracleConfigManager.getOracleConfig();
|
||||||
;
|
|
||||||
|
|
||||||
Connection conn = null;
|
Connection conn = null;
|
||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
@ -173,7 +172,7 @@ public class sendMessage
|
|||||||
* 保存的数据用来判断预警是否已经推送过,以防止反复推送数据。
|
* 保存的数据用来判断预警是否已经推送过,以防止反复推送数据。
|
||||||
*
|
*
|
||||||
* @param city 城市名称
|
* @param city 城市名称
|
||||||
* @param warnings 预警数据,为 QWeatherDisasterWarningItem 对象。
|
* @param warning 预警数据,为 QWeatherDisasterWarningItem 对象。
|
||||||
* @throws SQLException 执行sql时可能抛出的异常。出现sql异常,就回滚事务。
|
* @throws SQLException 执行sql时可能抛出的异常。出现sql异常,就回滚事务。
|
||||||
* @throws IOException 读取数据库配置文件时可能抛出的异常。
|
* @throws IOException 读取数据库配置文件时可能抛出的异常。
|
||||||
* @throws ClassNotFoundException 加载oracle jdbc驱动时可能抛出的异常。
|
* @throws ClassNotFoundException 加载oracle jdbc驱动时可能抛出的异常。
|
||||||
@ -185,9 +184,10 @@ public class sendMessage
|
|||||||
Connection conn = null;
|
Connection conn = null;
|
||||||
PreparedStatement stmt = null;
|
PreparedStatement stmt = null;
|
||||||
|
|
||||||
String sql = "insert into weather_disaster_notify(notify_id, sender, city,"
|
String sql = new StringBuilder().append( "insert into weather_disaster_notify(notify_id, sender, city," )
|
||||||
+ "warning_level, warning_type_code, warning_type_name, title,"
|
.append( "warning_level, warning_type_code, warning_type_name, title," )
|
||||||
+ "text, pub_time) values( ?,?,?,?,?,?,?,?,?)";
|
.append( "text, pub_time) values( ?,?,?,?,?,?,?,?,?)" )
|
||||||
|
.toString();
|
||||||
|
|
||||||
OracleConfig dbConfig = OracleConfigManager.getOracleConfig();
|
OracleConfig dbConfig = OracleConfigManager.getOracleConfig();
|
||||||
|
|
||||||
@ -259,7 +259,6 @@ public class sendMessage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
// 预警级别色彩
|
// 预警级别色彩
|
||||||
@ -272,7 +271,6 @@ public class sendMessage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class WechatOfficalAccountMessageParameter
|
class WechatOfficalAccountMessageParameter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user