|
|
@@ -1,152 +0,0 @@
|
|
|
-<?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.iots.device.mapper.IotWarnconfigMapper">
|
|
|
-
|
|
|
- <resultMap type="IotWarnconfig" id="IotWarnconfigResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="wcBid" column="wcBid" />
|
|
|
- <result property="wcName" column="wcName" />
|
|
|
- <result property="wcType" column="wcType" />
|
|
|
- <result property="wcLevel" column="wcLevel" />
|
|
|
- <result property="wcNoticetype" column="wcNoticetype" />
|
|
|
- <result property="wcRule" column="wcRule" />
|
|
|
- <result property="wcPushtype" column="wcPushtype" />
|
|
|
- <result property="wcPushtime" column="wcPushtime" />
|
|
|
- <result property="devBid" column="devBid" />
|
|
|
- <result property="wcRevrole" column="wcRevrole" />
|
|
|
- <result property="wcRecvuser" column="wcRecvuser" />
|
|
|
- <result property="wcAlvstatus" column="wcAlvstatus" />
|
|
|
- <result property="wcDelstatus" column="wcDelstatus" />
|
|
|
- <result property="wcTimerange" column="wcTimerange" />
|
|
|
- <result property="wcSuggestion" column="wcSuggestion" />
|
|
|
- <result property="wcCreator" column="wcCreator" />
|
|
|
- <result property="wcCreateddate" column="wcCreateddate" />
|
|
|
- <result property="wcModifier" column="wcModifier" />
|
|
|
- <result property="wcModifieddate" column="wcModifieddate" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectIotWarnconfigVo">
|
|
|
- select IotWarnconfig.id, wcBid, wcName, wcType, wcLevel, wcNoticetype, wcRule, wcPushtype, wcPushtime
|
|
|
- , devBid, wcRevrole, wcRecvuser, wcAlvstatus, wcDelstatus, wcTimerange, wcSuggestion
|
|
|
- , wcCreator, wcCreateddate, wcModifier, wcModifieddate
|
|
|
- ,IotWarntype.wtCata
|
|
|
- from IotWarnconfig
|
|
|
- left join IotWarntype on IotWarntype.wtBid = IotWarnconfig.wcType
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectIotWarnconfigList" parameterType="IotWarnconfigReqVo" resultType="IotWarnconfigResVo">
|
|
|
- <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="wcType != null and wcType != ''"> and wcType = #{wcType}</if>
|
|
|
- <if test="wtCata != null and wtCata != ''"> and wtCata = #{wtCata}</if>
|
|
|
- <if test="wcLevel != null and wcLevel != ''"> and wcLevel = #{wcLevel}</if>
|
|
|
- <if test="wcNoticetype != null and wcNoticetype != ''"> and wcNoticetype = #{wcNoticetype}</if>
|
|
|
- <if test="wcRule != null and wcRule != ''"> and wcRule = #{wcRule}</if>
|
|
|
- <if test="wcPushtype != null and wcPushtype != ''"> and wcPushtype = #{wcPushtype}</if>
|
|
|
- <if test="wcPushtime != null and wcPushtime != ''"> and wcPushtime = #{wcPushtime}</if>
|
|
|
- <if test="devBid != null and devBid != ''"> and FIND_IN_SET(#{devBid},devBid)>0</if>
|
|
|
- <if test="wcRevrole != null and wcRevrole != ''"> and wcRevrole = #{wcRevrole}</if>
|
|
|
- <if test="wcRecvuser != null and wcRecvuser != ''"> and wcRecvuser = #{wcRecvuser}</if>
|
|
|
- <if test="wcAlvstatus != null and wcAlvstatus != ''"> and wcAlvstatus = #{wcAlvstatus}</if>
|
|
|
- <if test="wcDelstatus != null and wcDelstatus != ''"> and wcDelstatus = #{wcDelstatus}</if>
|
|
|
- <if test="wcTimerange != null and wcTimerange != ''"> and wcTimerange = #{wcTimerange}</if>
|
|
|
- <if test="wcSuggestion != null and wcSuggestion != ''"> and wcSuggestion like concat('%', #{wcSuggestion}, '%')</if>
|
|
|
- <if test="wcCreator != null and wcCreator != ''"> and wcCreator = #{wcCreator}</if>
|
|
|
- <if test="wcCreateddate != null and wcCreateddate != ''"> and wcCreateddate = #{wcCreateddate}</if>
|
|
|
- <if test="wcModifier != null and wcModifier != ''"> and wcModifier = #{wcModifier}</if>
|
|
|
- <if test="wcModifieddate != null and wcModifieddate != ''"> and wcModifieddate = #{wcModifieddate}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectIotWarnconfigById" parameterType="Long" resultMap="IotWarnconfigResult">
|
|
|
- <include refid="selectIotWarnconfigVo"/>
|
|
|
- where id = #{id}
|
|
|
- </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="wcType != null">wcType,</if>
|
|
|
- <if test="wcLevel != null">wcLevel,</if>
|
|
|
- <if test="wcNoticetype != null">wcNoticetype,</if>
|
|
|
- <if test="wcRule != null">wcRule,</if>
|
|
|
- <if test="wcPushtype != null">wcPushtype,</if>
|
|
|
- <if test="wcPushtime != null">wcPushtime,</if>
|
|
|
- <if test="devBid != null">devBid,</if>
|
|
|
- <if test="wcRevrole != null">wcRevrole,</if>
|
|
|
- <if test="wcRecvuser != null">wcRecvuser,</if>
|
|
|
- <if test="wcAlvstatus != null">wcAlvstatus,</if>
|
|
|
- <if test="wcDelstatus != null">wcDelstatus,</if>
|
|
|
- <if test="wcTimerange != null">wcTimerange,</if>
|
|
|
- <if test="wcSuggestion != null">wcSuggestion,</if>
|
|
|
- <if test="wcCreator != null">wcCreator,</if>
|
|
|
- <if test="wcCreateddate != null">wcCreateddate,</if>
|
|
|
- <if test="wcModifier != null">wcModifier,</if>
|
|
|
- <if test="wcModifieddate != null">wcModifieddate,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="wcBid != null">#{wcBid},</if>
|
|
|
- <if test="wcName != null">#{wcName},</if>
|
|
|
- <if test="wcType != null">#{wcType},</if>
|
|
|
- <if test="wcLevel != null">#{wcLevel},</if>
|
|
|
- <if test="wcNoticetype != null">#{wcNoticetype},</if>
|
|
|
- <if test="wcRule != null">#{wcRule},</if>
|
|
|
- <if test="wcPushtype != null">#{wcPushtype},</if>
|
|
|
- <if test="wcPushtime != null">#{wcPushtime},</if>
|
|
|
- <if test="devBid != null">#{devBid},</if>
|
|
|
- <if test="wcRevrole != null">#{wcRevrole},</if>
|
|
|
- <if test="wcRecvuser != null">#{wcRecvuser},</if>
|
|
|
- <if test="wcAlvstatus != null">#{wcAlvstatus},</if>
|
|
|
- <if test="wcDelstatus != null">#{wcDelstatus},</if>
|
|
|
- <if test="wcTimerange != null">#{wcTimerange},</if>
|
|
|
- <if test="wcSuggestion != null">#{wcSuggestion},</if>
|
|
|
- <if test="wcCreator != null">#{wcCreator},</if>
|
|
|
- <if test="wcCreateddate != null">#{wcCreateddate},</if>
|
|
|
- <if test="wcModifier != null">#{wcModifier},</if>
|
|
|
- <if test="wcModifieddate != null">#{wcModifieddate},</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="wcType != null">wcType = #{wcType},</if>
|
|
|
- <if test="wcLevel != null">wcLevel = #{wcLevel},</if>
|
|
|
- <if test="wcNoticetype != null">wcNoticetype = #{wcNoticetype},</if>
|
|
|
- <if test="wcRule != null">wcRule = #{wcRule},</if>
|
|
|
- <if test="wcPushtype != null">wcPushtype = #{wcPushtype},</if>
|
|
|
- <if test="wcPushtime != null">wcPushtime = #{wcPushtime},</if>
|
|
|
- <if test="devBid != null">devBid = #{devBid},</if>
|
|
|
- <if test="wcRevrole != null">wcRevrole = #{wcRevrole},</if>
|
|
|
- <if test="wcRecvuser != null">wcRecvuser = #{wcRecvuser},</if>
|
|
|
- <if test="wcAlvstatus != null">wcAlvstatus = #{wcAlvstatus},</if>
|
|
|
- <if test="wcDelstatus != null">wcDelstatus = #{wcDelstatus},</if>
|
|
|
- <if test="wcTimerange != null">wcTimerange = #{wcTimerange},</if>
|
|
|
- <if test="wcSuggestion != null">wcSuggestion = #{wcSuggestion},</if>
|
|
|
- <if test="wcCreator != null">wcCreator = #{wcCreator},</if>
|
|
|
- <if test="wcCreateddate != null">wcCreateddate = #{wcCreateddate},</if>
|
|
|
- <if test="wcModifier != null">wcModifier = #{wcModifier},</if>
|
|
|
- <if test="wcModifieddate != null">wcModifieddate = #{wcModifieddate},</if>
|
|
|
- </trim>
|
|
|
- where id = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteIotWarnconfigById" parameterType="Long">
|
|
|
- delete from IotWarnconfig where id = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteIotWarnconfigByIds" parameterType="String">
|
|
|
- delete from IotWarnconfig where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
-</mapper>
|