<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                企業微信api,企業微信sdk接口 ,企業微信機器人api調用源碼 1、企業微信SDK接口API調用-企業微信好友收發消息 /** * 給企業微信好友發消息 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx, TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); TalkToFriendTaskMessage.Builder bd = TalkToFriendTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); TalkToFriendTaskMessage req = bd.build(); // 將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.TalkToFriendTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } /** * 企業微信好友發來聊天消息 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx, TransportMessage vo) { try { FriendTalkNoticeMessage req = vo.getContent().unpack(FriendTalkNoticeMessage.class); log.debug(JsonFormat.printer().print(req)); log.debug(LocalDateTime.now()+" 微信好友發來聊天消息 對應的線程名: "+Thread.currentThread().getName()); //消息轉發到pc端 asyncTaskService.msgSend2pc(String.valueOf(req.getWxId()), EnumMsgType.FriendTalkNotice, req); // 告訴客戶端消息已收到 MessageUtil.sendMsg(ctx, EnumMsgType.MsgReceivedAck, vo.getAccessToken(), vo.getId(), null); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendErrMsg(ctx, EnumErrorCode.InvalidParam,vo.getId(), e.getMessage()); } } 2、企業微信SDK接口API調用-通過手機號或微信好友添加客戶 /** * 企業微信搜索手機號添加微信 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ public void handleMsg(ChannelHandlerContext ctx ,TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); AddCustomerFromSearchTaskMessage.Builder bd = AddCustomerFromSearchTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); AddCustomerFromSearchTaskMessage req = bd.build(); // 將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.AddCustomerFromSearchTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } /** * 從企業微信好友中添加客戶 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ public void handleMsg(ChannelHandlerContext ctx ,TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); AddCustomerFromWxTaskMessage.Builder bd = AddCustomerFromWxTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); AddCustomerFromWxTaskMessage req = bd.build(); // 將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.AddCustomerFromWxTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } 3、企業微信SDK接口API調用-觸發企業微信推送聯系人列表 /** * 觸發推送企業微信聯系人列表任務 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); CommonTriggerTaskMessage.Builder bd = CommonTriggerTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); CommonTriggerTaskMessage req = bd.build(); //將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.TriggerContactPushTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } /** * 企業微信推送聯系人列表 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx, TransportMessage vo) { try { ContactPushNoticeMessage req = vo.getContent().unpack(ContactPushNoticeMessage.class); log.debug(JsonFormat.printer().print(req)); asyncTaskService.msgSend2pc(String.valueOf(req.getWxId()), EnumMsgType.ContactPushNotice, req); // 告訴客戶端消息已收到 MessageUtil.sendMsg(ctx, EnumMsgType.MsgReceivedAck, vo.getAccessToken(), vo.getId(), null); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendErrMsg(ctx, EnumErrorCode.InvalidParam,vo.getId(), Constant.ERROR_MSG_DECODFAIL); } } 4、企業微信SDK接口API調用-觸發企業微信推送會話列表 /** * 觸發企業微信推送會話列表任務 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); CommonTriggerTaskMessage.Builder bd = CommonTriggerTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); CommonTriggerTaskMessage req = bd.build(); //將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.TriggerConversationPushTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } /** * 企業微信聊天會話列表推送 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx, TransportMessage vo) { try { ConversationPushNoticeMessage req = vo.getContent().unpack(ConversationPushNoticeMessage.class); log.debug(JsonFormat.printer().print(req)); asyncTaskService.msgSend2pc(String.valueOf(req.getWxId()), EnumMsgType.ConversationPushNotice, req); // 告訴客戶端消息已收到 MessageUtil.sendMsg(ctx, EnumMsgType.MsgReceivedAck, vo.getAccessToken(), vo.getId(), null); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendErrMsg(ctx, EnumErrorCode.InvalidParam,vo.getId(), Constant.ERROR_MSG_DECODFAIL); } } 5、企業微信SDK接口API調用-觸發推送企業微信微信好友 /** * 觸發企業微信推送微信好友列表 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx,TransportMessage vo, String contentJsonStr) { try { log.debug(contentJsonStr); CommonTriggerTaskMessage.Builder bd = CommonTriggerTaskMessage.newBuilder(); JsonFormat.parser().merge(contentJsonStr, bd); CommonTriggerTaskMessage req = bd.build(); //將消息轉發送給手機客戶端 asyncTaskService.msgSend2Phone(ctx, String.valueOf(req.getWxId()), EnumMsgType.TriggerWechatFriendPushTask, vo, req); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL); } } /** * 企業微信好友列表推送,用于從微信好友中添加客戶 * @author wechat:happybabby110 * @blog http://www.wlkankan.cn */ @Async public void handleMsg(ChannelHandlerContext ctx, TransportMessage vo) { try { WxFriendPushNoticeMessage req = vo.getContent().unpack(WxFriendPushNoticeMessage.class); log.debug(JsonFormat.printer().print(req)); asyncTaskService.msgSend2pc(String.valueOf(req.getWxId()), EnumMsgType.WxFriendPushNotice, req); // 告訴客戶端消息已收到 MessageUtil.sendMsg(ctx, EnumMsgType.MsgReceivedAck, vo.getAccessToken(), vo.getId(), null); } catch (Exception e) { e.printStackTrace(); MessageUtil.sendErrMsg(ctx, EnumErrorCode.InvalidParam,vo.getId(), Constant.ERROR_MSG_DECODFAIL); } } 企業微信機器人sdk方案咨詢微信happybabby110
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看