1、获取 企业id、企业应用秘钥、企业应用的id
corpId、
corpsecret、
agentId
2、获取token
https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={corpId}&corpsecret={corpsecret}
替换上面的值
3、获取企业微信部门
https://qyapi.weixin.qq.com/cgi-bin/department/list?access_token=xxx
4、获取部门下的人员列表
https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token= accessToken+"&department_id="+qwDept.getId();
5、调用接口发消息
https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=ACCESS_TOKEN
WeChatUtil.httpRequest(url, "POST", jsonMessage);