| | |
| | | JSONObject jsonObject = JSON.parseArray(item.getBannerPictures()).getJSONObject(0); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | // 1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | vo.setImageUrl(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | vo.setImageUrl(jsonObject.toJSONString()); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | |
| | | JSONObject jsonObject = JSON.parseArray(xpBanner.getBannerPictures()).getJSONObject(0); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | // 1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | xpBanner.setBannerPictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpBanner.setBannerPictures(jsonObject.toJSONString()); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |