You've already forked FrameTour-BE
feat(service): 批量获取景区和设备信息
- 在 DeviceRepository 中添加批量获取设备信息的方法 - 在 ScenicRepository 中添加批量获取景区信息的方法 - 修改 OrderServiceImpl,使用批量方法获取景区名称 - 移除多个 mapper 文件中冗余的景区信息查询
This commit is contained in:
@@ -91,13 +91,13 @@
|
||||
select so.id, ms.scenic_id, device_id, ms.member_id, url, ms.is_free, so.create_time, so.update_time,sc.`name` as scenicName
|
||||
from member_source ms
|
||||
left join source so on ms.source_id = so.id
|
||||
left join scenic sc on sc.id = so.scenic_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,sc.`name` as scenicName
|
||||
from source so
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
|
||||
where so.id = #{id}
|
||||
</select>
|
||||
<select id="listGroupByType" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||
@@ -141,7 +141,7 @@
|
||||
select so.id, ms.scenic_id, device_id, url, ms.is_free, so.create_time, so.update_time,sc.`name` as scenicName, ms.is_buy, video_url
|
||||
from member_source ms
|
||||
left join source so on ms.source_id = so.id
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
|
||||
where
|
||||
ms.member_id = #{memberId} and so.id is not null
|
||||
<if test="scenicId!= null">and ms.scenic_id = #{scenicId} </if>
|
||||
@@ -155,7 +155,7 @@
|
||||
select so.id, ms.scenic_id, device_id, url, ms.is_free, 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
|
||||
|
||||
where ms.member_id = #{userId} and ms.source_id = #{sourceId} and so.id is not null
|
||||
limit 1
|
||||
</select>
|
||||
@@ -163,7 +163,7 @@
|
||||
select so.id, ms.face_id, ms.scenic_id, ms.type, so.url, ms.is_free, 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
|
||||
|
||||
where
|
||||
ms.member_id = #{memberId} and so.id
|
||||
<if test="faceId!= null">and ms.face_id = #{faceId} </if>
|
||||
|
Reference in New Issue
Block a user