修复无法查询membersorce购买情况

This commit is contained in:
Jerry Yan 2025-02-19 17:23:40 +08:00
parent 373922bbbf
commit 7b40ae85d0
2 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@
limit 1
</select>
<select id="listUser" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, ms.scenic_id, device_id, url, so.create_time, so.update_time,sc.`name` as scenicName
select so.id, ms.scenic_id, device_id, url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
from member_source ms
left join source so on ms.source_id = so.id
left join scenic sc on sc.id = so.scenic_id
@ -135,7 +135,7 @@
</select>
<select id="listUserOne" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
select so.id, ms.scenic_id, device_id, url, video_url, so.create_time, so.update_time,sc.`name` as scenicName
select so.id, ms.scenic_id, device_id, url, video_url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
from member_source ms
left join source so on ms.source_id = so.id
left join scenic sc on sc.id = so.scenic_id
@ -143,7 +143,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, so.create_time, so.update_time,sc.`name` as scenicName
select so.id, ms.face_id, ms.scenic_id, ms.type, so.url, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy
from member_source ms
left join source so on ms.source_id = so.id
left join scenic sc on sc.id = so.scenic_id
@ -167,21 +167,21 @@
where member_id = #{memberId} and source_id = #{sourceId} and type = #{type}
</select>
<select id="listVideoByFaceRelation" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select s.*
select s.*, ms.is_buy
from member_source ms
left join source s on ms.source_id = s.id
where ms.face_id = #{faceId} and ms.member_id = #{memberId} and ms.type = 1
order by create_time desc
</select>
<select id="listVideoByScenicFaceRelation" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select s.*
select s.*, ms.is_buy
from member_source ms
left join source s on ms.source_id = s.id
where ms.face_id = #{faceId} and ms.type = 1 and ms.scenic_id = #{scenicId}
order by create_time desc
</select>
<select id="listImageByFaceRelation" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select s.*
select s.*, ms.is_buy
from member_source ms
left join source s on ms.source_id = s.id
where ms.face_id = #{faceId} and ms.member_id = #{memberId} and ms.type = 2

View File

@ -92,7 +92,7 @@
</select>
<select id="queryByRelation" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select v.id, mv.scenic_id, v.template_id, mv.task_id, mv.face_id, worker_id, video_url, v.create_time, v.update_time,
s.name scenicName, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl,mv.is_buy
s.name scenicName, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl, mv.is_buy
from member_video mv
left join video v on mv.video_id = v.id
left join scenic s on s.id = v.scenic_id