| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.IotWarnconfigMapper">
-
- <resultMap type="IotWarnconfig" id="IotWarnconfigResult">
- <result property="id" column="id" />
- <result property="wcBid" column="wcBid" />
- <result property="wcName" column="wcName" />
- <result property="wcDesc" column="wcDesc" />
- <result property="wcStatus" column="wcStatus" />
- <result property="wcLevel" column="wcLevel" />
- <result property="wcTouchtype" column="wcTouchtype" />
- <result property="wcCondition" column="wcCondition" />
- <result property="wcRepeatnum" column="wcRepeatnum" />
- <result property="wcCreator" column="wcCreator" />
- <result property="wcCreateddate" column="wcCreateddate" />
- <result property="wcModifieddate" column="wcModifieddate" />
- <result property="wcModifier" column="wcModifier" />
- <result property="tid" column="tid" />
- </resultMap>
- <sql id="selectIotWarnconfigVo">
- select id, wcBid, wcName, wcDesc, wcStatus, wcLevel, wcTouchtype, wcCondition,wcRepeatnum, wcCreator, wcCreateddate, wcModifieddate, wcModifier, tid from IotWarnconfig
- </sql>
- <select id="selectIotWarnconfigList" parameterType="IotWarnconfig" resultMap="IotWarnconfigResult">
- <include refid="selectIotWarnconfigVo"/>
- <where>
- <if test="wcBid != null and wcBid != ''"> and wcBid = #{wcBid}</if>
- <if test="wcName != null and wcName != ''"> and wcName like concat('%', #{wcName}, '%')</if>
- <if test="wcDesc != null and wcDesc != ''"> and wcDesc = #{wcDesc}</if>
- <if test="wcStatus != null and wcStatus != ''"> and wcStatus = #{wcStatus}</if>
- <if test="wcLevel != null and wcLevel != ''"> and wcLevel = #{wcLevel}</if>
- <if test="wcTouchtype != null and wcTouchtype != ''"> and wcTouchtype = #{wcTouchtype}</if>
- <if test="wcCondition != null and wcCondition != ''"> and wcCondition = #{wcCondition}</if>
- <if test="wcRepeatnum != null and wcRepeatnum != ''"> and wcRepeatnum = #{wcRepeatnum}</if>
- <if test="wcCreator != null and wcCreator != ''"> and wcCreator = #{wcCreator}</if>
- <if test="wcCreateddate != null and wcCreateddate != ''"> and wcCreateddate = #{wcCreateddate}</if>
- <if test="wcModifieddate != null and wcModifieddate != ''"> and wcModifieddate = #{wcModifieddate}</if>
- <if test="wcModifier != null and wcModifier != ''"> and wcModifier = #{wcModifier}</if>
- <if test="tid != null and tid != ''"> and tid = #{tid}</if>
- </where>
- </select>
-
- <select id="selectIotWarnconfigByWcBid" parameterType="Long" resultMap="IotWarnconfigResult">
- <include refid="selectIotWarnconfigVo"/>
- where wcBid = #{wcBid} and tid = #{tid}
- </select>
-
- <insert id="insertIotWarnconfig" parameterType="IotWarnconfig" useGeneratedKeys="true" keyProperty="id">
- insert into IotWarnconfig
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="wcBid != null">wcBid,</if>
- <if test="wcName != null">wcName,</if>
- <if test="wcDesc != null">wcDesc,</if>
- <if test="wcStatus != null">wcStatus,</if>
- <if test="wcLevel != null">wcLevel,</if>
- <if test="wcTouchtype != null">wcTouchtype,</if>
- <if test="wcCondition != null">wcCondition,</if>
- <if test="wcRepeatnum != null">wcRepeatnum,</if>
- <if test="wcCreator != null">wcCreator,</if>
- <if test="wcCreateddate != null">wcCreateddate,</if>
- <if test="wcModifieddate != null">wcModifieddate,</if>
- <if test="wcModifier != null">wcModifier,</if>
- <if test="tid != null and tid != ''">tid,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="wcBid != null">#{wcBid},</if>
- <if test="wcName != null">#{wcName},</if>
- <if test="wcDesc != null">#{wcDesc},</if>
- <if test="wcStatus != null">#{wcStatus},</if>
- <if test="wcLevel != null">#{wcLevel},</if>
- <if test="wcTouchtype != null">#{wcTouchtype},</if>
- <if test="wcCondition != null">#{wcCondition},</if>
- <if test="wcRepeatnum != null">#{wcRepeatnum},</if>
- <if test="wcCreator != null">#{wcCreator},</if>
- <if test="wcCreateddate != null">#{wcCreateddate},</if>
- <if test="wcModifieddate != null">#{wcModifieddate},</if>
- <if test="wcModifier != null">#{wcModifier},</if>
- <if test="tid != null and tid != ''">#{tid},</if>
- </trim>
- </insert>
- <update id="updateIotWarnconfig" parameterType="IotWarnconfig">
- update IotWarnconfig
- <trim prefix="SET" suffixOverrides=",">
- <if test="wcBid != null">wcBid = #{wcBid},</if>
- <if test="wcName != null">wcName = #{wcName},</if>
- <if test="wcDesc != null">wcDesc = #{wcDesc},</if>
- <if test="wcStatus != null">wcStatus = #{wcStatus},</if>
- <if test="wcLevel != null">wcLevel = #{wcLevel},</if>
- <if test="wcTouchtype != null">wcTouchtype = #{wcTouchtype},</if>
- <if test="wcCondition != null">wcCondition = #{wcCondition},</if>
- <if test="wcRepeatnum != null">wcRepeatnum = #{wcRepeatnum},</if>
- <if test="wcCreator != null">wcCreator = #{wcCreator},</if>
- <if test="wcCreateddate != null">wcCreateddate = #{wcCreateddate},</if>
- <if test="wcModifieddate != null">wcModifieddate = #{wcModifieddate},</if>
- <if test="wcModifier != null">wcModifier = #{wcModifier},</if>
- <if test="tid != null and tid != ''">tid = #{tid},</if>
- </trim>
- where wcBid = #{wcBid}
- </update>
- <delete id="deleteIotWarnconfigByWcBid" parameterType="java.lang.String">
- delete from IotWarnconfig where wcBid = #{wcBid} and tid = #{tid}
- </delete>
- <delete id="deleteIotWarnconfigWcBids" parameterType="String">
- delete from IotWarnconfig where tid = #{tid} and wcBid in
- <foreach item="wcBid" collection="array" open="(" separator="," close=")">
- #{wcBid}
- </foreach>
- </delete>
- </mapper>
|