use of com.paascloud.provider.model.dto.oss.OptBatchGetUrlRequest in project paascloud-master by paascloud.
the class MdcProductServiceImpl method getProductVo.
@Override
public ProductVo getProductVo(final Long id) {
MdcProduct mdcProduct = mdcProductMapper.selectByPrimaryKey(id);
ProductVo productVo = new ModelMapper().map(mdcProduct, ProductVo.class);
List<Long> categoryIdList = Lists.newArrayList();
buildCategoryIdList(categoryIdList, mdcProduct.getCategoryId());
// 获取分类节点集合
Collections.reverse(categoryIdList);
productVo.setCategoryIdList(categoryIdList);
// 获取图片集合
final OptBatchGetUrlRequest request = new OptBatchGetUrlRequest(mdcProduct.getProductCode());
request.setEncrypt(true);
List<ElementImgUrlDto> imgUrlList = opcRpcService.listFileUrl(request);
productVo.setImgUrlList(imgUrlList);
return productVo;
}
Aggregations