| | |
| | | public static final String WEIXIN_DEFAULT_IMGS = "WEIXIN_DEFAULT_IMGS"; |
| | | public static final String USER_CARD_DEFAULT_IMG = "USER_CARD_DEFAULT_IMG"; |
| | | public static final String USERS_FILE = "USERS_FILE"; |
| | | public static final String SHARES_FILE = "SHARES_FILE"; |
| | | public static final String NEWS_FILE = "NEWS_FILE"; |
| | | public static final String USER_LABEL = "USER_LABEL"; |
| | | //发送会议开始 定时提前多少分钟发送 |
| | |
| | | |
| | | |
| | | public static final String WX_MINI_CONFIG = "WX_MINI_CONFIG"; |
| | | public static final String SHARE_HAIBAO_HEADER_TITLE = "SHARE_HAIBAO_HEADER_TITLE"; |
| | | public static final String WX_APPID_CUSTOMER = "WX_APPID_CUSTOMER"; |
| | | public static final String WX_SECRET_CUSTOMER = "WX_SECRET_CUSTOMER"; |
| | | public static final String WX_APPID_PERSONNEL = "WX_APPID_PERSONNEL"; |
| | |
| | | Response response = client.newCall(request).execute(); |
| | | if (response.isSuccessful()) { |
| | | InputStream inputStream = new ByteArrayInputStream(response.body().bytes()); |
| | | // ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | // byte[] buffer = new byte[1024]; |
| | | // int len = -1; |
| | | // while ((len = inputStream.read(buffer)) != -1) { |
| | | // baos.write(buffer, 0, len); |
| | | // } |
| | | // System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray())); |
| | | /* ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int len = -1; |
| | | while ((len = inputStream.read(buffer)) != -1) { |
| | | baos.write(buffer, 0, len); |
| | | } |
| | | System.out.println("data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()));*/ |
| | | return inputStream; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"生成图片失败"); |
| | | return null; |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"生成图片失败"); |
| | | } |
| | | |
| | | |