This commit is contained in:
wentch
2015-12-11 14:37:22 +08:00
parent e330036a2a
commit da1dabdec3
2 changed files with 18 additions and 20 deletions

View File

@@ -11,7 +11,6 @@ import org.redkale.convert.json.JsonConvert;
import org.redkale.util.AutoLoad;
import org.redkale.service.LocalService;
import org.redkale.service.Service;
import org.redkale.convert.json.JsonFactory;
import java.io.*;
import java.net.*;
import java.nio.*;
@@ -151,15 +150,15 @@ public class ApnsService implements Service {
socket.close();
}
public static void main(String[] args) throws Exception {
ApnsService service = new ApnsService();
service.convert = JsonFactory.root().getConvert();
service.init(null);
final String token = "01727b19 b9f8abf4 0891e31d 3446479d a43902e1 819edc44 a073d951 b8b7db90";
ApnsPayload payload = new ApnsPayload("您有新的消息", "这是消息内容", 1);
System.out.println(payload);
service.pushApnsMessage(new ApnsMessage(token, payload));
}
// public static void main(String[] args) throws Exception {
// ApnsService service = new ApnsService();
// service.convert = JsonFactory.root().getConvert();
// service.init(null);
//
// final String token = "01727b19 b9f8abf4 0891e31d 3446479d a43902e1 819edc44 a073d951 b8b7db90";
// ApnsPayload payload = new ApnsPayload("您有新的消息", "这是消息内容", 1);
// System.out.println(payload);
// service.pushApnsMessage(new ApnsMessage(token, payload));
// }
}

View File

@@ -6,7 +6,6 @@
package org.redkale.service.weixin;
import org.redkale.util.ByteArray;
import org.redkale.boot.Application;
import org.redkale.util.TypeToken;
import org.redkale.util.Utility;
import org.redkale.convert.json.JsonConvert;
@@ -85,14 +84,14 @@ public class WeiXinQYService implements Service {
public WeiXinQYService() {
}
public static void main(String[] args) throws Exception {
WeiXinQYService service = Application.singleton(WeiXinQYService.class);
WeiXinQYMessage message = new WeiXinQYMessage();
message.setTextMessage("【测试】duang");
message.setAgentid("2");
service.sendQYMessage(message);
}
// public static void main(String[] args) throws Exception {
// WeiXinQYService service = Application.singleton(WeiXinQYService.class);
//
// WeiXinQYMessage message = new WeiXinQYMessage();
// message.setTextMessage("【测试】duang");
// message.setAgentid("2");
// service.sendQYMessage(message);
// }
//-----------------------------------微信企业号接口----------------------------------------------------------
public Map<String, String> getQYUserCode(String code, String agentid) throws IOException {