| | |
| | | } else if (VideoContentTypeEnum.IMG.getValue().equals(vo.getVideoContentType()) && StringUtils.isNotBlank(vo.getVideoImgs())) { |
| | | vo.setImgs(JSON.parseArray(vo.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList())); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(vo.getGoodsList())) { |
| | | vo.getGoodsList().stream().forEach(goods -> { |
| | | goods.setThumbnail(cosUtil.getPreviewUrl(goods.getThumbnail())); |
| | | }); |
| | | } |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | |
| | | } 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())); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(v.getGoodsList())) { |
| | | v.getGoodsList().stream().forEach(goods -> { |
| | | goods.setThumbnail(cosUtil.getPreviewUrl(goods.getThumbnail())); |
| | | }); |
| | | } |
| | | v.setSubscribeThisAuthor(subscribes.contains(v.getAuthorId())); |
| | | }); |
| | | } |
| | |
| | | @Override |
| | | public Result getGoodsDetail(String videoId) { |
| | | List<VideoGoodsDetailVO> goodsList = baseMapper.getVideoGoods(videoId); |
| | | goodsList.stream().forEach(goods -> { |
| | | goods.setThumbnail(cosUtil.getPreviewUrl(goods.getThumbnail())); |
| | | }); |
| | | return Result.ok().data(goodsList); |
| | | } |
| | | |