200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 微信api接口调用-发朋友圈

微信api接口调用-发朋友圈

时间:2024-07-23 11:33:05

相关推荐

微信api接口调用-发朋友圈

微信api接口调用-发朋友圈

/*** 发微信朋友圈* @author wechatno:tangjinjinwx* @blog */@Asyncpublic void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) {try {log.debug(contentJsonStr);PostSNSNewsTaskMessage.Builder bd = PostSNSNewsTaskMessage.newBuilder();JsonFormat.parser().merge(contentJsonStr, bd);PostSNSNewsTaskMessage req = bd.build();//PostSNSNewsTaskMessage req = vo.getContent().unpack(PostSNSNewsTaskMessage.class);asyncTaskService.msgSend2Phone(ctx, req.getWeChatId(), EnumMsgType.PostSNSNewsTask, vo, req);} catch (Exception e) {e.printStackTrace();MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL);}}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。