| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?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.IotWarnpolicyMapper">
-
- <resultMap type="IotWarnpolicy" id="IotWarnpolicyResult">
- <result property="id" column="id" />
- <result property="wpBid" column="wpBid" />
- <result property="wcBid" column="wcBid" />
- <result property="wpFrequency" column="wpFrequency" />
- <result property="wpType" column="wpType" />
- <result property="deliveryTimePeriod" column="deliveryTimePeriod" />
- <result property="wpChannel" column="wpChannel" />
- <result property="wpCreator" column="wpCreator" />
- <result property="wpCreateddate" column="wpCreateddate" />
- <result property="wpModifieddate" column="wpModifieddate" />
- <result property="wpModifier" column="wpModifier" />
- <result property="tid" column="tid" />
- </resultMap>
- <sql id="selectIotWarnpolicyVo">
- select id, wpBid, wcBid, wpFrequency, wpType, deliveryTimePeriod, wpChannel, wpCreator, wpCreateddate, wpModifieddate, wpModifier, tid from IotWarnpolicy
- </sql>
- <select id="selectIotWarnpolicyList" parameterType="IotWarnpolicy" resultMap="IotWarnpolicyResult">
- <include refid="selectIotWarnpolicyVo"/>
- <where>
- <if test="wpBid != null and wpBid != ''"> and wpBid = #{wpBid}</if>
- <if test="wcBid != null and wcBid != ''"> and wcBid = #{wcBid}</if>
- <if test="wpFrequency != null and wpFrequency != ''"> and wpFrequency = #{wpFrequency}</if>
- <if test="wpType != null and wpType != ''"> and wpType = #{wpType}</if>
- <if test="deliveryTimePeriod != null and deliveryTimePeriod != ''"> and deliveryTimePeriod = #{deliveryTimePeriod}</if>
- <if test="wpChannel != null and wpChannel != ''"> and wpChannel = #{wpChannel}</if>
- <if test="wpCreator != null and wpCreator != ''"> and wpCreator = #{wpCreator}</if>
- <if test="wpCreateddate != null and wpCreateddate != ''"> and wpCreateddate = #{wpCreateddate}</if>
- <if test="wpModifieddate != null and wpModifieddate != ''"> and wpModifieddate = #{wpModifieddate}</if>
- <if test="wpModifier != null and wpModifier != ''"> and wpModifier = #{wpModifier}</if>
- <if test="tid != null and tid != ''"> and tid = #{tid}</if>
- </where>
- </select>
-
- <select id="selectIotWarnpolicyById" parameterType="Long" resultMap="IotWarnpolicyResult">
- <include refid="selectIotWarnpolicyVo"/>
- where wpBid = #{wpBid} and tid = #{tid}
- </select>
-
- <insert id="insertIotWarnpolicy" parameterType="IotWarnpolicy" useGeneratedKeys="true" keyProperty="id">
- insert into IotWarnpolicy
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="wpBid != null">wpBid,</if>
- <if test="wcBid != null">wcBid,</if>
- <if test="wpFrequency != null">wpFrequency,</if>
- <if test="wpType != null">wpType,</if>
- <if test="deliveryTimePeriod != null">deliveryTimePeriod,</if>
- <if test="wpChannel != null">wpChannel,</if>
- <if test="wpCreator != null">wpCreator,</if>
- <if test="wpCreateddate != null">wpCreateddate,</if>
- <if test="wpModifieddate != null">wpModifieddate,</if>
- <if test="wpModifier != null">wpModifier,</if>
- <if test="tid != null and tid != ''">tid,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="wpBid != null">#{wpBid},</if>
- <if test="wcBid != null">#{wcBid},</if>
- <if test="wpFrequency != null">#{wpFrequency},</if>
- <if test="wpType != null">#{wpType},</if>
- <if test="deliveryTimePeriod != null">#{deliveryTimePeriod},</if>
- <if test="wpChannel != null">#{wpChannel},</if>
- <if test="wpCreator != null">#{wpCreator},</if>
- <if test="wpCreateddate != null">#{wpCreateddate},</if>
- <if test="wpModifieddate != null">#{wpModifieddate},</if>
- <if test="wpModifier != null">#{wpModifier},</if>
- <if test="tid != null and tid != ''">#{tid},</if>
- </trim>
- </insert>
- <update id="updateIotWarnpolicy" parameterType="IotWarnpolicy">
- update IotWarnpolicy
- <trim prefix="SET" suffixOverrides=",">
- <if test="wpBid != null">wpBid = #{wpBid},</if>
- <if test="wcBid != null">wcBid = #{wcBid},</if>
- <if test="wpFrequency != null">wpFrequency = #{wpFrequency},</if>
- <if test="wpType != null">wpType = #{wpType},</if>
- <if test="deliveryTimePeriod != null">deliveryTimePeriod = #{deliveryTimePeriod},</if>
- <if test="wpChannel != null">wpChannel = #{wpChannel},</if>
- <if test="wpCreator != null">wpCreator = #{wpCreator},</if>
- <if test="wpCreateddate != null">wpCreateddate = #{wpCreateddate},</if>
- <if test="wpModifieddate != null">wpModifieddate = #{wpModifieddate},</if>
- <if test="wpModifier != null">wpModifier = #{wpModifier},</if>
- <if test="tid != null and tid != ''">tid = #{tid},</if>
- </trim>
- where wpBid = #{wpBid}
- </update>
- <delete id="deleteIotWarnpolicyByWpBid" parameterType="Long">
- delete from IotWarnpolicy where wpBid = #{wpBid} and tid = #{tid}
- </delete>
- <delete id="deleteIotWarnpolicyByWpBids" parameterType="String">
- delete from IotWarnpolicy where tid = #{tid} and wpBid in
- <foreach item="wpBid" collection="array" open="(" separator="," close=")">
- #{wpBid}
- </foreach>
- </delete>
- </mapper>
|