| | |
| | | } |
| | | |
| | | /** |
| | | * 推送群消息 |
| | | * todo:推送群消息 |
| | | * |
| | | * @param webHook 企业微信机器人地址 |
| | | * @param content 数据 |
| | | * @throws Exception |
| | | */ |
| | | public static String informWebHook(String webHook, String content) { |
| | | JSONObject jsonObject = new JSONObject() |
| | | .accumulate("msgtype", "text") |
| | | .accumulate("text", new JSONObject() |
| | | .accumulate("content", content)); |
| | | return HttpRequest.post(webHook).header("Content-Type", "application/json").body(jsonObject.toString()).execute().body(); |
| | | // JSONObject jsonObject = new JSONObject() |
| | | // .accumulate("msgtype", "text") |
| | | // .accumulate("text", new JSONObject() |
| | | // .accumulate("content", content)); |
| | | // return HttpRequest.post(webHook).header("Content-Type", "application/json").body(jsonObject.toString()).execute().body(); |
| | | return null; |
| | | } |
| | | |
| | | public static String getMd5(File file) { |