2025-01-18 19:05:51 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.central.order.mapper.TourismMapper">
|
|
|
|
|
|
|
|
|
|
<select id="findList" resultType="com.central.order.model.Tourism">
|
|
|
|
|
select * from tourisms t
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<resultMap id="TourismResultMap" type="com.central.order.model.Tourism">
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="getTourismById" resultMap="TourismResultMap">
|
|
|
|
|
SELECT * FROM tourisms WHERE id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertTourism">
|
|
|
|
|
INSERT INTO tourisms (tourism_no, tourism_name, tourism_address,tourism_phone)
|
|
|
|
|
VALUES (#{tourismNo}, #{tourismName}, #{tourismAddress},#{tourismPhone})
|
|
|
|
|
</insert>
|
2025-07-21 10:29:00 +08:00
|
|
|
|
|
|
|
|
<!-- 获取景区设备列表 -->
|
|
|
|
|
<select id="getDevicesByTourismId" resultType="java.util.Map">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
q.device_sn as deviceSn,
|
|
|
|
|
q.name as qrcodeName,
|
|
|
|
|
q.code_id as qrcodeId,
|
|
|
|
|
q.price as qrcodePrice,
|
|
|
|
|
q.status as qrcodeStatus,
|
|
|
|
|
q.create_time as qrcodeCreateTime,
|
|
|
|
|
t.tourism_name as tourismName,
|
|
|
|
|
t.tourism_address as tourismAddress
|
|
|
|
|
FROM qrcodes q
|
|
|
|
|
LEFT JOIN tourisms t ON q.tourism_id = t.id
|
|
|
|
|
WHERE q.tourism_id = #{tourismId}
|
|
|
|
|
AND q.is_del = 0
|
|
|
|
|
AND t.is_del = 0
|
|
|
|
|
ORDER BY q.create_time DESC
|
|
|
|
|
</select>
|
2025-01-18 19:05:51 +08:00
|
|
|
</mapper>
|