| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?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.yunfeiyun.agmp.iotm.web.mapper.IotWarnreceiverMapper">
- <resultMap type="IotWarnreceiver" id="IotWarnreceiverResult">
- <result property="id" column="id" />
- <result property="wrBid" column="wrBid" />
- <result property="wcBid" column="wcBid" />
- <result property="wruserId" column="wruserId" />
- <result property="tid" column="tid" />
- </resultMap>
- <sql id="selectIotWarnreceiverVo">
- select id, wrBid, wcBid, wruserId, tid from IotWarnreceiver
- </sql>
- <select id="selectIotWarnreceiverList" parameterType="IotWarnreceiver" resultMap="IotWarnreceiverResult">
- <include refid="selectIotWarnreceiverVo"/>
- <where>
- <if test="wrBid != null and wrBid != ''"> and wrBid = #{wrBid}</if>
- <if test="wcBid != null and wcBid != ''"> and wcBid = #{wcBid}</if>
- <if test="wruserId != null and wruserId != ''"> and wruserId = #{wruserId}</if>
- <if test="tid != null and tid != ''"> and tid = #{tid}</if>
- </where>
- </select>
- <select id="selectIotWarnreceiverByWrBid" parameterType="Long" resultMap="IotWarnreceiverResult">
- <include refid="selectIotWarnreceiverVo"/>
- where wrBid = #{wrBid} and tid = #{tid}
- </select>
- <select id="selectIotWarnreceiversByWcBid" resultType="com.yunfeiyun.agmp.iot.common.domain.IotWarnreceiver">
- SELECT *
- FROM IotWarnreceiver
- WHERE wcBid = #{wcBid}
- </select>
- <insert id="insertIotWarnreceiver" parameterType="IotWarnreceiver" useGeneratedKeys="true" keyProperty="id">
- insert into IotWarnreceiver
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="wrBid != null">wrBid,</if>
- <if test="wcBid != null">wcBid,</if>
- <if test="wruserId != null">wruserId,</if>
- <if test="tid != null and tid != ''">tid,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="wrBid != null">#{wrBid},</if>
- <if test="wcBid != null">#{wcBid},</if>
- <if test="wruserId != null">#{wruserId},</if>
- <if test="tid != null and tid != ''">#{tid},</if>
- </trim>
- </insert>
- <update id="updateIotWarnreceiver" parameterType="IotWarnreceiver">
- update IotWarnreceiver
- <trim prefix="SET" suffixOverrides=",">
- <if test="wrBid != null">wrBid = #{wrBid},</if>
- <if test="wcBid != null">wcBid = #{wcBid},</if>
- <if test="wruserId != null">wruserId = #{wruserId},</if>
- <if test="tid != null and tid != ''">tid = #{tid},</if>
- </trim>
- where wrBid = #{wrBid}
- </update>
- <delete id="deleteIotWarnreceiverByWrBid" >
- delete from IotWarnreceiver where wrBid = #{wrBid} and tid = #{tid}
- </delete>
- <delete id="deleteIotWarnreceiverByWrBids" parameterType="String">
- delete from IotWarnreceiver where tid = #{tid} and wrBid in
- <foreach item="wrBid" collection="array" open="(" separator="," close=")">
- #{wrBid}
- </foreach>
- </delete>
- <delete id="deleteIotWarnreceiverByWcBid">
- delete from IotWarnreceiver where wcBid = #{wcBid}
- </delete>
- </mapper>
|