|
@@ -52,7 +52,7 @@ public class ReminderService {
|
|
|
return reminderDao.delete(id);
|
|
|
}
|
|
|
|
|
|
- private String getToken() {
|
|
|
+ public String getToken() {
|
|
|
JSONObject js = new JSONObject();
|
|
|
String userId = "system";
|
|
|
long timestamp = System.currentTimeMillis() + 30000;
|
|
@@ -70,7 +70,7 @@ public class ReminderService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- public void send(String userId, String data, String type) {
|
|
|
+ public void send(String token, String userId, String data, String type) {
|
|
|
long m = System.currentTimeMillis();
|
|
|
JSONObject js = new JSONObject();
|
|
|
js.put("conversationId", userId);
|
|
@@ -91,7 +91,7 @@ public class ReminderService {
|
|
|
JSONObject j = new JSONObject();
|
|
|
j.put("text", type);
|
|
|
js.put("body", j);
|
|
|
- String s = WeChatUtil.httpPost("https://www.waywish.com/im/message/save", js, getToken());
|
|
|
+ String s = WeChatUtil.httpPost("https://www.waywish.com/im/message/save", js, token);
|
|
|
log.info("在" + m + "时间点给userId:" + userId + "发送消息成功.");
|
|
|
}
|
|
|
|