You've already forked FrameTour-BE
feat(source): 添加缩略图URL字段支持
- 在SourceController中移除了@Deprecated注解 - 在SourceMapper.xml的多个查询SQL中增加了thumb_url字段 - 更新了list、userGetById、getById、listUserOne和queryByRelation等方法的SELECT语句- 确保所有相关接口能够返回thumb_url数据 - 改动涉及视频源分页查询及相关详情获取逻辑
This commit is contained in:
@@ -22,7 +22,6 @@ public class SourceController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SourceService sourceService;
|
private SourceService sourceService;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
// 分页查询视频源
|
// 分页查询视频源
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
public ApiResponse pageQuery(@RequestBody SourceReqQuery sourceReqQuery) {
|
public ApiResponse pageQuery(@RequestBody SourceReqQuery sourceReqQuery) {
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="list" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<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
|
from source so
|
||||||
<where>
|
<where>
|
||||||
<if test="scenicId!= null">and so.scenic_id = #{scenicId} </if>
|
<if test="scenicId!= null">and so.scenic_id = #{scenicId} </if>
|
||||||
@@ -191,14 +191,14 @@
|
|||||||
order by so.create_time desc
|
order by so.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="userGetById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<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
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
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
|
where so.id = #{id} and ms.member_id = #{userId} and so.id is not null
|
||||||
</select>
|
</select>
|
||||||
<select id="getById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<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
|
from source so
|
||||||
|
|
||||||
where so.id = #{id}
|
where so.id = #{id}
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listUserOne" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<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
|
from member_source ms
|
||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="queryByRelation" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
<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
|
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