You've already forked FrameTour-BE
修复source问题
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
select s.scenic_id, s.device_id
|
select s.scenic_id, s.device_id
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source s on ms.source_id = s.id
|
left join source s on ms.source_id = s.id
|
||||||
where ms.type = 1
|
where ms.type = 1 and s.id is not null
|
||||||
and s.create_time >= #{start}
|
and s.create_time >= #{start}
|
||||||
and s.create_time <= #{end}
|
and s.create_time <= #{end}
|
||||||
group by s.scenic_id, s.device_id, ms.face_id
|
group by s.scenic_id, s.device_id, ms.face_id
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
select s.scenic_id, s.device_id
|
select s.scenic_id, s.device_id
|
||||||
from member_source ms
|
from member_source ms
|
||||||
left join source s on ms.source_id = s.id
|
left join source s on ms.source_id = s.id
|
||||||
where ms.type = 2
|
where ms.type = 2 and s.id is not null
|
||||||
and s.create_time >= #{start}
|
and s.create_time >= #{start}
|
||||||
and s.create_time <= #{end}
|
and s.create_time <= #{end}
|
||||||
group by s.scenic_id, s.device_id, ms.face_id
|
group by s.scenic_id, s.device_id, ms.face_id
|
||||||
|
@@ -94,7 +94,7 @@
|
|||||||
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
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
where so.id = #{id} and ms.member_id = #{userId}
|
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,sc.`name` as scenicName
|
select so.id, scenic_id, device_id, url, video_url, so.create_time, so.update_time,sc.`name` as scenicName
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
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
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
where ms.member_id = #{userId} and ms.source_id = #{sourceId}
|
where ms.member_id = #{userId} and ms.source_id = #{sourceId} and so.id is not null
|
||||||
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">
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
left join source so on ms.source_id = so.id
|
left join source so on ms.source_id = so.id
|
||||||
left join scenic sc on sc.id = so.scenic_id
|
left join scenic sc on sc.id = so.scenic_id
|
||||||
where
|
where
|
||||||
ms.member_id = #{memberId}
|
ms.member_id = #{memberId} and so.id
|
||||||
<if test="faceId!= null">and ms.face_id = #{faceId} </if>
|
<if test="faceId!= null">and ms.face_id = #{faceId} </if>
|
||||||
<if test="type!=null">and ms.type = #{type} </if>
|
<if test="type!=null">and ms.type = #{type} </if>
|
||||||
<if test="scenicId!= null">and ms.scenic_id = #{scenicId} </if>
|
<if test="scenicId!= null">and ms.scenic_id = #{scenicId} </if>
|
||||||
|
Reference in New Issue
Block a user