feat: 优化景区素材

This commit is contained in:
2025-10-25 18:04:01 +08:00
parent 839f682ca8
commit 10a8e2a1ea
12 changed files with 515 additions and 552 deletions
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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.TourismFileMapper">
@@ -12,4 +12,30 @@
<select id="getByTourismId" resultMap="TourismFileResultMap">
SELECT * FROM tourisms_files WHERE tourism_id = #{tourismId}
</select>
<select id="findByTourismIds" resultType="com.central.order.model.TourismFile">
SELECT *
FROM tourisms_files
<where>
<if test="tourismIds != null and tourismIds.size > 0">
tourism_id IN
<foreach collection="tourismIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="type != null">
AND type = #{type}
</if>
<if test="status != null">
AND status = #{status}
</if>
<if test="description != null and description != ''">
AND description LIKE CONCAT('%', #{description}, '%')
</if>
<!-- 仅查询未删除数据 -->
AND (is_del = 0 OR is_del IS NULL)
</where>
ORDER BY id DESC
</select>
</mapper>