Call Dingding interface to send work notifications

Attach the official document link for reference: https://developers.dingtalk.com/document/app/asynchronous-sending-of-enterprise-session-messages

Next on the code, the actual test is available: (when multiple people are notified, the list data is converted into a String string)

 // Send a
 DingTalk message to notify dDComponent.sendMessage(receivers, ""The item has been uploaded successfully");
 //Send
 a DingTalk message to notify the administrator String sql="select account_id from tbl_user_role_info a ,tbl_user_info b where a.user_id=b.user_id and a.role_id='admin'";
 List<DDBean> list=jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(DDBean.class));
 log.info("Recipient list:"+list.size()) ;
 if (!CollectionUtils.isEmpty(list)){  StringBuilder sb = new StringBuilder();  String account_id = "";  for(int i=0;i<list.size();i++){         if(i<list. size()-1){



Guess you like

Origin blog.csdn.net/weixin_47385625/article/details/114328245