| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.fs.watch.mapper.WatchMsgSetMapper">
- <resultMap type="WatchMsgSet" id="WatchMsgSetResult">
- <result property="id" column="id" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="msgType" column="msg_type" />
- <result property="msgTitle" column="msg_title" />
- <result property="msgDescription" column="msg_description" />
- <result property="detailsType" column="details_type" />
- <result property="normalRule" column="normal_rule" />
- <result property="abnormalRule" column="abnormal_rule" />
- <result property="status" column="status" />
- </resultMap>
- <sql id="selectWatchMsgSetVo">
- select id, create_time, update_time, msg_type, msg_title, msg_description, details_type, normal_rule, abnormal_rule,status from watch_msg_set
- </sql>
- <select id="selectWatchMsgSetList" parameterType="WatchMsgSet" resultMap="WatchMsgSetResult">
- <include refid="selectWatchMsgSetVo"/>
- <where>
- <if test="msgType != null "> and msg_type = #{msgType}</if>
- <if test="msgTitle != null and msgTitle != ''"> and msg_title = #{msgTitle}</if>
- <if test="msgDescription != null and msgDescription != ''"> and msg_description = #{msgDescription}</if>
- <if test="detailsType != null and detailsType != ''"> and details_type = #{detailsType}</if>
- <if test="normalRule != null "> and normal_rule = #{normalRule}</if>
- <if test="abnormalRule != null "> and abnormal_rule = #{abnormalRule}</if>
- <if test="status != null "> and status = #{status}</if>
- </where>
- </select>
- <select id="selectWatchMsgSetById" parameterType="Integer" resultMap="WatchMsgSetResult">
- <include refid="selectWatchMsgSetVo"/>
- where id = #{id}
- </select>
- <insert id="insertWatchMsgSet" parameterType="WatchMsgSet" useGeneratedKeys="true" keyProperty="id">
- insert into watch_msg_set
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="msgType != null">msg_type,</if>
- <if test="msgTitle != null">msg_title,</if>
- <if test="msgDescription != null">msg_description,</if>
- <if test="detailsType != null">details_type,</if>
- <if test="normalRule != null">normal_rule,</if>
- <if test="abnormalRule != null">abnormal_rule,</if>
- <if test="status != null">abnormal_rule,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="msgType != null">#{msgType},</if>
- <if test="msgTitle != null">#{msgTitle},</if>
- <if test="msgDescription != null">#{msgDescription},</if>
- <if test="detailsType != null">#{detailsType},</if>
- <if test="normalRule != null">#{normalRule},</if>
- <if test="abnormalRule != null">#{abnormalRule},</if>
- <if test="status != null">#{status},</if>
- </trim>
- </insert>
- <update id="updateWatchMsgSet" parameterType="WatchMsgSet">
- update watch_msg_set
- <trim prefix="SET" suffixOverrides=",">
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="msgType != null">msg_type = #{msgType},</if>
- <if test="msgTitle != null">msg_title = #{msgTitle},</if>
- <if test="msgDescription != null">msg_description = #{msgDescription},</if>
- <if test="detailsType != null">details_type = #{detailsType},</if>
- <if test="normalRule != null">normal_rule = #{normalRule},</if>
- <if test="abnormalRule != null">abnormal_rule = #{abnormalRule},</if>
- <if test="status != null">status = #{status},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteWatchMsgSetById" parameterType="Integer">
- delete from watch_msg_set where id = #{id}
- </delete>
- <delete id="deleteWatchMsgSetByIds" parameterType="String">
- delete from watch_msg_set where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|