| | |
| | | } |
| | | if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) { |
| | | v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); |
| | | |
| | | String coverFileKey = v.getCoverFileKey(); |
| | | v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); |
| | | if (StringUtils.isNotBlank(coverFileKey) && !coverFileKey.contains("http")) { |
| | | v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); |
| | | } |
| | | |
| | | } else if (VideoContentTypeEnum.IMG.getValue().equals(v.getVideoContentType()) && StringUtils.isNotBlank(v.getVideoImgs())) { |
| | | v.setImgs(JSON.parseArray(v.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList())); |
| | | } |