| | |
| | | public class WxCpUtils { |
| | | |
| | | public static final String CORP_ID = "wwa423654b975441ac"; |
| | | public static final String CORP_SECRET = "snXq8qwA5tGu0YN1PlSDQqr6u9x3A0c_jQDmt8CN8Vs"; |
| | | public static final Integer AGENT_ID = 1000515; |
| | | public static final String CORP_SECRET = "jqifSrLWjVJqBpszh0LawP3RFYwbfz46Cm0o0HF0N4I"; |
| | | public static final Integer AGENT_ID = 1000828; |
| | | |
| | | /** |
| | | * @param user 例:ZT-033268|ZT-028629,多个中间用|隔开 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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(); |
| | | return null; |
| | | 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(); |
| | | } |
| | | |
| | | public static String getMd5(File file) { |