@Test public void testGetKfListAction() throws ValidateException { ActionMulticaster multicaster = Context.getContext().getBean(ActionMulticaster.class); GetKfListReq req = new GetKfListReq(); BaseRes res = multicaster.multicast(req); System.out.println(JSON.toJSONString(res)); }
@Test public void testKfAccountAddAction() throws ValidateException { ActionMulticaster multicaster = Context.getContext().getBean(ActionMulticaster.class); KfAccountAddReq req = new KfAccountAddReq(); req.setKfAccount("test@gh_ed595887caa3"); req.setNickname("客服"); req.setPassword(DigestUtils.md5Hex("123456q")); BaseRes res = multicaster.multicast(req); System.out.println(JSON.toJSONString(res)); }
/** * 从微信服务器回去accessToken * * @return {@link AccessToken} */ private static AccessToken getAccessTokenFromWX() { try { TokenReq req = new TokenReq(); ActionMulticaster multicaster = Context.getContext().getBean(ActionMulticaster.class); return multicaster.multicast(req); } catch (ValidateException e) { LOGGER.error(e.getMessage(), e); } return null; }