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;
|
private Long faceId;
|
||||||
// 原素材类型:1视频,2图像
|
// 原素材类型:1视频,2图像
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
private String thumbUrl;
|
||||||
/**
|
/**
|
||||||
* 文件存储地址
|
* 文件存储地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -237,6 +237,11 @@ public class GoodsServiceImpl implements GoodsService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
goodsDetailVO.setScenicName("");
|
goodsDetailVO.setScenicName("");
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(sourceRespVO.getThumbUrl())) {
|
||||||
|
goodsDetailVO.setTemplateCoverUrl(sourceRespVO.getThumbUrl());
|
||||||
|
} else {
|
||||||
|
goodsDetailVO.setTemplateCoverUrl(sourceRespVO.getUrl());
|
||||||
|
}
|
||||||
goodsDetailVO.setGoodsType(sourceType);
|
goodsDetailVO.setGoodsType(sourceType);
|
||||||
goodsDetailVO.setFaceId(face.getId());
|
goodsDetailVO.setFaceId(face.getId());
|
||||||
goodsDetailVO.setGoodsId(sourceRespVO.getId());
|
goodsDetailVO.setGoodsId(sourceRespVO.getId());
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="listUser" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<select id="listUser" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||||
select so.id, ms.scenic_id, device_id, url, ms.is_free, so.create_time, so.update_time, ms.is_buy, video_url
|
select so.id, ms.scenic_id, device_id, thumb_url, url, ms.is_free, so.create_time, so.update_time, ms.is_buy, video_url
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user