You've already forked FrameTour-BE
feat(source): 添加缩略图URL字段并优化商品详情展示逻辑
- 在 SourceRespVO 中新增 thumbUrl 字段用于存储缩略图地址- 修改 GoodsServiceImpl 中的商品详情封面图设置逻辑,优先使用缩略图 - 更新 SourceMapper.xml 查询语句,增加 thumb_url 字段的查询支持
This commit is contained in:
@@ -33,6 +33,7 @@ public class SourceRespVO {
|
||||
private Long faceId;
|
||||
// 原素材类型:1视频,2图像
|
||||
private Integer type;
|
||||
private String thumbUrl;
|
||||
/**
|
||||
* 文件存储地址
|
||||
*/
|
||||
|
||||
@@ -237,6 +237,11 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
} catch (Exception e) {
|
||||
goodsDetailVO.setScenicName("");
|
||||
}
|
||||
if (StringUtils.isNotBlank(sourceRespVO.getThumbUrl())) {
|
||||
goodsDetailVO.setTemplateCoverUrl(sourceRespVO.getThumbUrl());
|
||||
} else {
|
||||
goodsDetailVO.setTemplateCoverUrl(sourceRespVO.getUrl());
|
||||
}
|
||||
goodsDetailVO.setGoodsType(sourceType);
|
||||
goodsDetailVO.setFaceId(face.getId());
|
||||
goodsDetailVO.setGoodsId(sourceRespVO.getId());
|
||||
|
||||
Reference in New Issue
Block a user