微信api接口,加好友及通过好友请求
/**
* 微信自动添加好友
* @author wechatno:tangjinjinwx
* @blog http://www.wlkankan.cn
*/
@Async
public void handleMsg(ChannelHandlerContext ctx ,TransportMessage vo, String contentJsonStr) {
try {
log.debug(contentJsonStr);
FriendAddTaskSetting req = JSON.parseObject(contentJsonStr,FriendAddTaskSetting.class);
if(null != req){
String resp ="fail";
resp = friendAddTaskService.savePcTask(req);
//3、告诉PC客户端消息已收到
MessageUtil.sendCustomJsonMsg(ctx, "AutoFriendAddTaskResp", resp);
}
} catch (Exception e) {
e.printStackTrace();
MessageUtil.sendJsonErrMsg(ctx, EnumErrorCode.InvalidParam, Constant.ERROR_MSG_DECODFAIL);
}
}
/**
* 微信新增好友通知
* @author wechatno:tangjinjinwx
* @blog http://www.wlkankan.cn
*/</