feat(source): 添加缩略图URL字段支持

- 在SourceController中移除了@Deprecated注解
- 在SourceMapper.xml的多个查询SQL中增加了thumb_url字段
- 更新了list、userGetById、getById、listUserOne和queryByRelation等方法的SELECT语句- 确保所有相关接口能够返回thumb_url数据
- 改动涉及视频源分页查询及相关详情获取逻辑
This commit is contained in:
2025-10-20 10:40:08 +08:00
parent 602eb84f9c
commit e5a58ae757
2 changed files with 5 additions and 6 deletions

View File

@@ -22,7 +22,6 @@ public class SourceController {
@Autowired
private SourceService sourceService;
@Deprecated
// 分页查询视频源
@PostMapping("/page")
public ApiResponse pageQuery(@RequestBody SourceReqQuery sourceReqQuery) {

View File

@@ -176,7 +176,7 @@
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, so.scenic_id, device_id, url, so.create_time, so.update_time,so.video_url, so.`type`, so.face_sample_id
select so.id, so.scenic_id, device_id, thumb_url, url, so.create_time, so.update_time,so.video_url, so.`type`, so.face_sample_id
from source so
<where>
<if test="scenicId!= null">and so.scenic_id = #{scenicId} </if>
@@ -191,14 +191,14 @@
order by so.create_time desc
</select>
<select id="userGetById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, ms.scenic_id, device_id, ms.member_id, url, ms.is_free, so.create_time, so.update_time
select so.id, ms.scenic_id, device_id, ms.member_id, thumb_url, url, ms.is_free, so.create_time, so.update_time
from member_source ms
left join source so on ms.source_id = so.id
where so.id = #{id} and ms.member_id = #{userId} and so.id is not null
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, scenic_id, device_id, url, video_url, so.create_time, so.update_time
select so.id, scenic_id, device_id, thumb_url, url, video_url, so.create_time, so.update_time
from source so
where so.id = #{id}
@@ -255,7 +255,7 @@
</select>
<select id="listUserOne" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, ms.scenic_id, device_id, url, ms.is_free, video_url, so.create_time, so.update_time,ms.is_buy
select so.id, ms.scenic_id, device_id, thumb_url, url, ms.is_free, video_url, so.create_time, so.update_time,ms.is_buy
from member_source ms
left join source so on ms.source_id = so.id
@@ -263,7 +263,7 @@
limit 1
</select>
<select id="queryByRelation" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, ms.face_id, ms.scenic_id, ms.type, so.url, ms.is_free, so.create_time, so.update_time,ms.is_buy
select so.id, ms.face_id, ms.scenic_id, ms.type, so.thumb_url, so.url, ms.is_free, so.create_time, so.update_time,ms.is_buy
from member_source ms
left join source so on ms.source_id = so.id