@Test public void testChatGet() throws Exception { WxCpChat chat = this.cpService.getChatService().chatGet(chatId); System.out.println(chat); Assert.assertEquals(chat.getName(), "测试群聊"); }
@Override public WxCpChat chatGet(String chatId) throws WxErrorException { String result = this.cpService.get(APPCHAT_GET_CHATID + chatId, null); return WxCpGsonBuilder.create() .fromJson(JSON_PARSER.parse(result).getAsJsonObject().getAsJsonObject("chat_info").toString(), WxCpChat.class); }
WxCpChatServiceImpl implements WxCpChatService { @Override public WxCpChat chatGet(String chatId) throws WxErrorException { String result = this.cpService.get(APPCHAT_GET_CHATID + chatId, null); return WxCpGsonBuilder.create() .fromJson(JSON_PARSER.parse(result).getAsJsonObject().getAsJsonObject("chat_info").toString(), WxCpChat.class); } }
WxCpChatServiceImpl implements WxCpChatService { @Override public WxCpChat chatGet(String chatId) throws WxErrorException { String result = this.cpService.get(APPCHAT_GET_CHATID + chatId, null); return WxCpGsonBuilder.create() .fromJson(JSON_PARSER.parse(result).getAsJsonObject().getAsJsonObject("chat_info").toString(), WxCpChat.class); } WxCpChatServiceImpl(WxCpService cpService); }
WxCpChatServiceImpl implements WxCpChatService { @Override public WxCpChat chatGet(String chatId) throws WxErrorException { String result = this.cpService.get(APPCHAT_GET_CHATID + chatId, null); return WxCpGsonBuilder.create() .fromJson(JSON_PARSER.parse(result).getAsJsonObject().getAsJsonObject("chat_info").toString(), WxCpChat.class); } WxCpChatServiceImpl(WxCpService cpService); @Override String chatCreate(String name, String owner, List<String> users, String chatId); @Override String create(String name, String owner, List<String> users, String chatId); @Override void chatUpdate(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete); @Override void update(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete); @Override WxCpChat chatGet(String chatId); @Override WxCpChat get(String chatId); @Override void sendMsg(WxCpAppChatMessage message); }
WxCpChatServiceImpl implements WxCpChatService { @Override public WxCpChat chatGet(String chatId) throws WxErrorException { String result = this.cpService.get(APPCHAT_GET_CHATID + chatId, null); return WxCpGsonBuilder.create() .fromJson(JSON_PARSER.parse(result).getAsJsonObject().getAsJsonObject("chat_info").toString(), WxCpChat.class); } WxCpChatServiceImpl(WxCpService cpService); @Override String chatCreate(String name, String owner, List<String> users, String chatId); @Override String create(String name, String owner, List<String> users, String chatId); @Override void chatUpdate(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete); @Override void update(String chatId, String name, String owner, List<String> usersToAdd, List<String> usersToDelete); @Override WxCpChat chatGet(String chatId); @Override WxCpChat get(String chatId); @Override void sendMsg(WxCpAppChatMessage message);  }