修改配置文件,增加公众号接口URL配置项。
This commit is contained in:
parent
216c6926ac
commit
130f237af2
@ -2,6 +2,7 @@
|
||||
"title": "天气灾害预警配置文件",
|
||||
"key": "fe9fa8eeeb6f4301a92541eed565dd15",
|
||||
"query_url": "https://devapi.qweather.com/v7/warning/now?",
|
||||
"wechat_officalaccount_url": "https://cxxmwx.cpic.com.cn/app/index.php?i=2&c=entry&do=send_group_tpl_api&m=ok_tplmessage",
|
||||
"cities": [
|
||||
{
|
||||
"city_name": "厦门",
|
||||
|
@ -20,9 +20,7 @@
|
||||
<module name="disaster_warning" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java/test/com/cpic/xim/wechat/officalAccount/PushMessageTest.java" charset="GBK" />
|
||||
<file url="file://$PROJECT_DIR$/src/test/java/com/cpic/xim/wechat/officalAccount/sendMessageTest.java" charset="UTF-8" />
|
||||
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
<component name="ExportToHTMLSettings">
|
||||
|
@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.Vector;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||
|
||||
@ -110,9 +111,24 @@ public class WeatherDisasterNotifyConfig
|
||||
this.notifyStuffs = notifyStuffs;
|
||||
}
|
||||
|
||||
public String getWechatOfficalAccountURL()
|
||||
{
|
||||
return wechatOfficalAccountURL;
|
||||
}
|
||||
|
||||
public void setWechatOfficalAccountURL( String wechatOfficalAccountURL )
|
||||
{
|
||||
this.wechatOfficalAccountURL = wechatOfficalAccountURL;
|
||||
}
|
||||
|
||||
private String title;
|
||||
private String key;
|
||||
private String queryUrl;
|
||||
|
||||
@JsonProperty("wechat_officalaccount_url")
|
||||
private String wechatOfficalAccountURL;
|
||||
private Vector<City> cities;
|
||||
private Vector<CpicxmStuff> notifyStuffs;
|
||||
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ public class sendMessageTest
|
||||
|
||||
try
|
||||
{
|
||||
//sendMessage.sendNotifyMessage( url, "警报", "警报标题", "警报内容!" );
|
||||
sendMessage.sendNotifyMessage( url, "警报", "警报标题", "警报内容!" );
|
||||
}
|
||||
catch ( Exception error )
|
||||
|
Loading…
x
Reference in New Issue
Block a user