huaguoshan-admin/ruoyi-system/target/classes/mapper/system/CmsDynmicTouristMapper.xml

76 lines
3.8 KiB
XML
Raw Permalink Normal View History

2024-06-18 15:21:41 +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.ruoyi.system.mapper.CmsDynmicTouristMapper">
<resultMap type="CmsDynmicTourist" id="CmsDynmicTouristResult">
<result property="id" column="id" />
<result property="maximumNum" column="maximum_num" />
<result property="instantaneousMaximumNum" column="Instantaneous_maximum_num" />
<result property="inParkNum" column="in_park_num" />
<result property="reservationNum" column="reservation_num" />
<result property="comfortLev" column="comfort_lev" />
</resultMap>
<sql id="selectCmsDynmicTouristVo">
select id, maximum_num, Instantaneous_maximum_num, in_park_num, reservation_num, comfort_lev from cms_dynmic_tourist
</sql>
<select id="selectCmsDynmicTouristList" parameterType="CmsDynmicTourist" resultMap="CmsDynmicTouristResult">
<include refid="selectCmsDynmicTouristVo"/>
<where>
<if test="maximumNum != null "> and maximum_num = #{maximumNum}</if>
<if test="instantaneousMaximumNum != null "> and Instantaneous_maximum_num = #{instantaneousMaximumNum}</if>
<if test="inParkNum != null "> and in_park_num = #{inParkNum}</if>
<if test="reservationNum != null "> and reservation_num = #{reservationNum}</if>
<if test="comfortLev != null and comfortLev != ''"> and comfort_lev = #{comfortLev}</if>
</where>
</select>
<select id="selectCmsDynmicTouristById" parameterType="Long" resultMap="CmsDynmicTouristResult">
<include refid="selectCmsDynmicTouristVo"/>
where id = #{id}
</select>
<insert id="insertCmsDynmicTourist" parameterType="CmsDynmicTourist" useGeneratedKeys="true" keyProperty="id">
insert into cms_dynmic_tourist
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="maximumNum != null">maximum_num,</if>
<if test="instantaneousMaximumNum != null">Instantaneous_maximum_num,</if>
<if test="inParkNum != null">in_park_num,</if>
<if test="reservationNum != null">reservation_num,</if>
<if test="comfortLev != null">comfort_lev,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="maximumNum != null">#{maximumNum},</if>
<if test="instantaneousMaximumNum != null">#{instantaneousMaximumNum},</if>
<if test="inParkNum != null">#{inParkNum},</if>
<if test="reservationNum != null">#{reservationNum},</if>
<if test="comfortLev != null">#{comfortLev},</if>
</trim>
</insert>
<update id="updateCmsDynmicTourist" parameterType="CmsDynmicTourist">
update cms_dynmic_tourist
<trim prefix="SET" suffixOverrides=",">
<if test="maximumNum != null">maximum_num = #{maximumNum},</if>
<if test="instantaneousMaximumNum != null">Instantaneous_maximum_num = #{instantaneousMaximumNum},</if>
<if test="inParkNum != null">in_park_num = #{inParkNum},</if>
<if test="reservationNum != null">reservation_num = #{reservationNum},</if>
<if test="comfortLev != null">comfort_lev = #{comfortLev},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCmsDynmicTouristById" parameterType="Long">
delete from cms_dynmic_tourist where id = #{id}
</delete>
<delete id="deleteCmsDynmicTouristByIds" parameterType="String">
delete from cms_dynmic_tourist where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>