feat(service): 批量获取景区和设备信息

- 在 DeviceRepository 中添加批量获取设备信息的方法
- 在 ScenicRepository 中添加批量获取景区信息的方法
- 修改 OrderServiceImpl,使用批量方法获取景区名称
- 移除多个 mapper 文件中冗余的景区信息查询
This commit is contained in:
2025-09-07 01:42:38 +08:00
parent d9a2da49bb
commit 5a89a7c60a
14 changed files with 289 additions and 60 deletions

View File

@@ -10,13 +10,12 @@
</update>
<select id="selectByQuery" resultType="com.ycwl.basic.model.pc.coupon.resp.CouponRespVO">
SELECT
c.id, scenic_id AS scenicId, s.name as scenicName,
c.id, scenic_id AS scenicId,
c.name AS name, c.description AS description, c.countdown AS countdown, c.broadcast,
config_ids AS configIds, discount_price AS discountPrice,
type, discount_type AS discountType,
c.status, c.create_at
FROM coupon c
LEFT JOIN scenic s ON c.scenic_id = s.id
<where>
AND c.deleted = 0
<if test="scenicId != null">AND scenic_id = #{scenicId}</if>