|
|
@@ -0,0 +1,126 @@
|
|
|
+<?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.IotWarnlogMapper">
|
|
|
+
|
|
|
+ <resultMap type="IotWarnlog" id="IotWarnlogResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="wlBid" column="wlBid" />
|
|
|
+ <result property="wrName" column="wrName" />
|
|
|
+ <result property="wrType" column="wrType" />
|
|
|
+ <result property="wrContent" column="wrContent" />
|
|
|
+ <result property="wrLevel" column="wrLevel" />
|
|
|
+ <result property="devtypeBid" column="devtypeBid" />
|
|
|
+ <result property="devBid" column="devBid" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="wrDealuserid" column="wrDealuserid" />
|
|
|
+ <result property="wrDealresult" column="wrDealresult" />
|
|
|
+ <result property="wrDealtime" column="wrDealtime" />
|
|
|
+ <result property="wrCreator" column="wrCreator" />
|
|
|
+ <result property="wrCreateddate" column="wrCreateddate" />
|
|
|
+ <result property="wrData" column="wrData" />
|
|
|
+ <result property="tid" column="tid" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectIotWarnlogVo">
|
|
|
+ select id, wlBid, wrName, wrType, wrContent, wrLevel, devtypeBid, devBid, status, wrDealuserid, wrDealresult, wrDealtime, wrCreator, wrCreateddate, wrData, tid from IotWarnlog
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectIotWarnlogList" parameterType="IotWarnlog" resultMap="IotWarnlogResult">
|
|
|
+ <include refid="selectIotWarnlogVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="wlBid != null and wlBid != ''"> and wlBid = #{wlBid}</if>
|
|
|
+ <if test="wrName != null and wrName != ''"> and wrName like concat('%', #{wrName}, '%')</if>
|
|
|
+ <if test="wrType != null and wrType != ''"> and wrType = #{wrType}</if>
|
|
|
+ <if test="wrContent != null and wrContent != ''"> and wrContent = #{wrContent}</if>
|
|
|
+ <if test="wrLevel != null and wrLevel != ''"> and wrLevel = #{wrLevel}</if>
|
|
|
+ <if test="devtypeBid != null and devtypeBid != ''"> and devtypeBid = #{devtypeBid}</if>
|
|
|
+ <if test="devBid != null and devBid != ''"> and devBid = #{devBid}</if>
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="wrDealuserid != null and wrDealuserid != ''"> and wrDealuserid = #{wrDealuserid}</if>
|
|
|
+ <if test="wrDealresult != null and wrDealresult != ''"> and wrDealresult = #{wrDealresult}</if>
|
|
|
+ <if test="wrDealtime != null and wrDealtime != ''"> and wrDealtime = #{wrDealtime}</if>
|
|
|
+ <if test="wrCreator != null and wrCreator != ''"> and wrCreator = #{wrCreator}</if>
|
|
|
+ <if test="wrCreateddate != null and wrCreateddate != ''"> and wrCreateddate = #{wrCreateddate}</if>
|
|
|
+ <if test="wrData != null and wrData != ''"> and wrData = #{wrData}</if>
|
|
|
+ <if test="tid != null and tid != ''"> and tid = #{tid}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectIotWarnlogById" parameterType="Long" resultMap="IotWarnlogResult">
|
|
|
+ <include refid="selectIotWarnlogVo"/>
|
|
|
+ where id = #{id} and tid = #{tid}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertIotWarnlog" parameterType="IotWarnlog" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into IotWarnlog
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="wlBid != null">wlBid,</if>
|
|
|
+ <if test="wrName != null">wrName,</if>
|
|
|
+ <if test="wrType != null">wrType,</if>
|
|
|
+ <if test="wrContent != null">wrContent,</if>
|
|
|
+ <if test="wrLevel != null">wrLevel,</if>
|
|
|
+ <if test="devtypeBid != null">devtypeBid,</if>
|
|
|
+ <if test="devBid != null">devBid,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="wrDealuserid != null">wrDealuserid,</if>
|
|
|
+ <if test="wrDealresult != null">wrDealresult,</if>
|
|
|
+ <if test="wrDealtime != null">wrDealtime,</if>
|
|
|
+ <if test="wrCreator != null">wrCreator,</if>
|
|
|
+ <if test="wrCreateddate != null">wrCreateddate,</if>
|
|
|
+ <if test="wrData != null">wrData,</if>
|
|
|
+ <if test="tid != null and tid != ''">tid,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="wlBid != null">#{wlBid},</if>
|
|
|
+ <if test="wrName != null">#{wrName},</if>
|
|
|
+ <if test="wrType != null">#{wrType},</if>
|
|
|
+ <if test="wrContent != null">#{wrContent},</if>
|
|
|
+ <if test="wrLevel != null">#{wrLevel},</if>
|
|
|
+ <if test="devtypeBid != null">#{devtypeBid},</if>
|
|
|
+ <if test="devBid != null">#{devBid},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="wrDealuserid != null">#{wrDealuserid},</if>
|
|
|
+ <if test="wrDealresult != null">#{wrDealresult},</if>
|
|
|
+ <if test="wrDealtime != null">#{wrDealtime},</if>
|
|
|
+ <if test="wrCreator != null">#{wrCreator},</if>
|
|
|
+ <if test="wrCreateddate != null">#{wrCreateddate},</if>
|
|
|
+ <if test="wrData != null">#{wrData},</if>
|
|
|
+ <if test="tid != null and tid != ''">#{tid},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateIotWarnlog" parameterType="IotWarnlog">
|
|
|
+ update IotWarnlog
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="wlBid != null">wlBid = #{wlBid},</if>
|
|
|
+ <if test="wrName != null">wrName = #{wrName},</if>
|
|
|
+ <if test="wrType != null">wrType = #{wrType},</if>
|
|
|
+ <if test="wrContent != null">wrContent = #{wrContent},</if>
|
|
|
+ <if test="wrLevel != null">wrLevel = #{wrLevel},</if>
|
|
|
+ <if test="devtypeBid != null">devtypeBid = #{devtypeBid},</if>
|
|
|
+ <if test="devBid != null">devBid = #{devBid},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="wrDealuserid != null">wrDealuserid = #{wrDealuserid},</if>
|
|
|
+ <if test="wrDealresult != null">wrDealresult = #{wrDealresult},</if>
|
|
|
+ <if test="wrDealtime != null">wrDealtime = #{wrDealtime},</if>
|
|
|
+ <if test="wrCreator != null">wrCreator = #{wrCreator},</if>
|
|
|
+ <if test="wrCreateddate != null">wrCreateddate = #{wrCreateddate},</if>
|
|
|
+ <if test="wrData != null">wrData = #{wrData},</if>
|
|
|
+ <if test="tid != null and tid != ''">tid = #{tid},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteIotWarnlogByWlBid" parameterType="Long">
|
|
|
+ delete from IotWarnlog where id = #{id} and tid = #{tid}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteIotWarnlogByWlBids" parameterType="String">
|
|
|
+ delete from IotWarnlog where tid = #{tid} and id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|