企业微信api接口调用-通过手机号或微信好友添加客户

简介: 企业微信api接口调用-通过手机号或微信好友添加客户

企业微信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);
    }
}


相关文章
|
1天前
|
API 开发工具
企业微信SDK接口API调用-通过手机号或微信好友添加客户
企业微信SDK接口API调用-通过手机号或微信好友添加客户
|
6天前
|
API 开发工具
企业微信api接口调用-触发推送企业微信微信好友
企业微信api接口调用-触发推送企业微信微信好友
|
6天前
|
API
企业微信api接口调用-企业微信好友收发消息
企业微信api接口调用-企业微信好友收发消息
|
7天前
|
开发工具
云控微信开发SDK使用教程--手机微信朋友圈图片上传服务端
云控微信开发SDK使用教程--手机微信朋友圈图片上传服务端
|
30天前
|
JavaScript Java 测试技术
基于微信小程序的手机商城+springboot+vue.js附带文章和源代码设计说明文档ppt
基于微信小程序的手机商城+springboot+vue.js附带文章和源代码设计说明文档ppt
27 2
|
1月前
|
小程序 API 数据安全/隐私保护
微信小程序开发中的一些常用标签
这些标签是微信小程序开发中的基础,开发者可以根据需要组合使用这些标签来构建小程序的界面。每个标签都有其属性和事件,可以通过属性来调整组件的样式和行为,通过事件来响应用户的操作。
56 5
|
22天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的智慧旅游平台开发微信小程序的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的智慧旅游平台开发微信小程序的详细设计和实现
39 8
|
2天前
|
小程序 Java Maven
springboot开发微信小程序
springboot开发微信小程序
8 0
|
3天前
|
小程序 开发者 Windows
安装VantWeapp开发微信小程序
安装VantWeapp开发微信小程序
12 0
|
30天前
|
PHP
PHP公众号开发给用户发微信消息提醒功能
该内容是一个关于如何在时间紧迫的情况下,通过微信客服消息接口实现用户资金到账或成员变动时发送微信通知的项目总结。
29 2