| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public String drawInviteQrCode(String url, Long uid, String portrait) throws IOException {
|
| | | public String drawInviteQrCode(String url, Long uid, String portrait, String inviteCode) throws IOException {
|
| | | if (url != null && !url.equals("")) {
|
| | | String targetPath = FileUtil.getCacheDir() + "/share_" + uid + "_" + System.currentTimeMillis() + ".jpg";
|
| | | String erCodeTempPath = FileUtil.getCacheDir() + "/" + uid + "_" + System.currentTimeMillis() + ".jpg";
|
| | |
| | | InputStream erCodeInputStream = new FileInputStream(new File(erCodeTempPath)); // 二维码
|
| | |
|
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
|
| | | ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath);
|
| | | ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, inviteCode);
|
| | |
|
| | | if (new File(targetPath).exists() && new File(targetPath).length() > 0) {
|
| | | // 上传文件
|
| | |
| | |
|
| | | @Override
|
| | | public String drawInviteQrCode(String url, Long uid, String portrait, int erCodePostionX, int erCodePostionY,
|
| | | int erCodeSize) throws IOException {
|
| | | int erCodeSize, String inviteCode) throws IOException {
|
| | | if (!StringUtil.isNullOrEmpty(url)) {
|
| | | String targetPath = FileUtil.getCacheDir() + "/share_" + uid + "_" + System.currentTimeMillis() + ".jpg";
|
| | | String erCodeTempPath = FileUtil.getCacheDir() + "/" + uid + "_" + System.currentTimeMillis() + ".jpg";
|
| | |
| | |
|
| | | // 开始根据 url(背景图), qrCode(二维码), portrait(头像) 生成图片
|
| | | ImageUtil.inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath,
|
| | | erCodePostionX, erCodePostionY, erCodeSize);
|
| | | erCodePostionX, erCodePostionY, erCodeSize, inviteCode);
|
| | |
|
| | | if (new File(targetPath).exists() && new File(targetPath).length() > 0) {
|
| | | // 上传文件
|