|
|
@ -80,9 +80,9 @@ public class MsmServiceImpl implements IMsmService { |
|
|
|
// }
|
|
|
|
//微信推送
|
|
|
|
@Override |
|
|
|
public JSONArray wenXinSend(String appId, String appSecret) { |
|
|
|
public JSONArray wenXinSend(String appId, String appSecret,String content) { |
|
|
|
MsmServiceImpl msmService = new MsmServiceImpl(); |
|
|
|
return msmService.sendTemp(appId, appSecret); |
|
|
|
return msmService.sendTemp(appId, appSecret,content); |
|
|
|
} |
|
|
|
|
|
|
|
//获取微信token
|
|
|
@ -111,7 +111,7 @@ public class MsmServiceImpl implements IMsmService { |
|
|
|
} |
|
|
|
|
|
|
|
//执行微信推送
|
|
|
|
public JSONArray sendTemp(String appId, String appSecret) { |
|
|
|
public JSONArray sendTemp(String appId, String appSecret,String content) { |
|
|
|
JSONArray objects = new JSONArray(); |
|
|
|
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(100); |
|
|
|
MsmServiceImpl msmService = new MsmServiceImpl(); |
|
|
@ -134,7 +134,7 @@ public class MsmServiceImpl implements IMsmService { |
|
|
|
// 封装data
|
|
|
|
com.alibaba.fastjson.JSONObject data = new com.alibaba.fastjson.JSONObject(); |
|
|
|
com.alibaba.fastjson.JSONObject name = new com.alibaba.fastjson.JSONObject(); |
|
|
|
name.put("value", "做一个身体和心灵都勇敢的人,趁着身体未老,心灵还透明。晚安!"); |
|
|
|
name.put("value", content); |
|
|
|
data.put("name", name); |
|
|
|
com.alibaba.fastjson.JSONObject weather = new com.alibaba.fastjson.JSONObject(); |
|
|
|
weather.put("value", "阴天 19°c"); |
|
|
|