|
|
@@ -0,0 +1,182 @@
|
|
|
+<?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.IotCmdtaskMapper">
|
|
|
+
|
|
|
+ <resultMap type="IotCmdtask" id="IotCmdtaskResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="tid" column="tid" />
|
|
|
+ <result property="ctBid" column="ctBid" />
|
|
|
+ <result property="ctStatus" column="ctStatus" />
|
|
|
+ <result property="ctDescribe" column="ctDescribe" />
|
|
|
+ <result property="ctStartddate" column="ctStartddate" />
|
|
|
+ <result property="ctCompletedate" column="ctCompletedate" />
|
|
|
+ <result property="ctRequestid" column="ctRequestid" />
|
|
|
+ <result property="ctRequestSource" column="ctRequestSource" />
|
|
|
+ <result property="ctRequestParam" column="ctRequestParam" />
|
|
|
+ <result property="ctReceiptstatus" column="ctReceiptstatus" />
|
|
|
+ <result property="ctReceiptddate" column="ctReceiptddate" />
|
|
|
+ <result property="ctReceiptaddr" column="ctReceiptaddr" />
|
|
|
+ <result property="ctCreator" column="ctCreator" />
|
|
|
+ <result property="ctModifier" column="ctModifier" />
|
|
|
+ <result property="ctModifieddate" column="ctModifieddate" />
|
|
|
+ <result property="ctCreateddate" column="ctCreateddate" />
|
|
|
+ <result property="ctDelstatus" column="ctDelstatus" />
|
|
|
+ <result property="ctCreatorname" column="ctCreatorname" />
|
|
|
+ <result property="ctBiztype" column="ctBiztype" />
|
|
|
+ <result property="ctBiztitle" column="ctBiztitle" />
|
|
|
+ <result property="ctParam" column="ctParam" />
|
|
|
+ <result property="ctCtime" column="ctCtime" />
|
|
|
+ <result property="ctDevcode" column="ctDevcode" />
|
|
|
+ <result property="ctDevtype" column="ctDevtype" />
|
|
|
+ <result property="ctLogtype" column="ctLogtype" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectIotCmdtaskVo">
|
|
|
+ select id, tid, ctBid, ctStatus, ctDescribe, ctStartddate, ctCompletedate, ctRequestid, ctRequestSource, ctRequestParam, ctReceiptstatus, ctReceiptddate, ctReceiptaddr, ctCreator, ctModifier, ctModifieddate, ctCreateddate, ctDelstatus, ctCreatorname, ctBiztype, ctBiztitle, ctParam, ctCtime, ctDevcode, ctDevtype,ctLogtype from IotCmdtask
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectIotCmdtaskList" parameterType="IotCmdtask" resultMap="IotCmdtaskResult">
|
|
|
+ <include refid="selectIotCmdtaskVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="tid != null and tid != ''"> and tid = #{tid}</if>
|
|
|
+ <if test="ctBid != null and ctBid != ''"> and ctBid = #{ctBid}</if>
|
|
|
+ <if test="ctStatus != null and ctStatus != ''"> and ctStatus = #{ctStatus}</if>
|
|
|
+ <if test="ctDescribe != null and ctDescribe != ''"> and ctDescribe = #{ctDescribe}</if>
|
|
|
+ <if test="ctStartddate != null and ctStartddate != ''"> and ctStartddate = #{ctStartddate}</if>
|
|
|
+ <if test="ctCompletedate != null and ctCompletedate != ''"> and ctCompletedate = #{ctCompletedate}</if>
|
|
|
+ <if test="ctRequestid != null and ctRequestid != ''"> and ctRequestid = #{ctRequestid}</if>
|
|
|
+ <if test="ctRequestSource != null and ctRequestSource != ''"> and ctRequestSource = #{ctRequestSource}</if>
|
|
|
+ <if test="ctRequestParam != null and ctRequestParam != ''"> and ctRequestParam = #{ctRequestParam}</if>
|
|
|
+ <if test="ctReceiptstatus != null and ctReceiptstatus != ''"> and ctReceiptstatus = #{ctReceiptstatus}</if>
|
|
|
+ <if test="ctReceiptddate != null and ctReceiptddate != ''"> and ctReceiptddate = #{ctReceiptddate}</if>
|
|
|
+ <if test="ctReceiptaddr != null and ctReceiptaddr != ''"> and ctReceiptaddr = #{ctReceiptaddr}</if>
|
|
|
+ <if test="ctCreator != null and ctCreator != ''"> and ctCreator = #{ctCreator}</if>
|
|
|
+ <if test="ctModifier != null and ctModifier != ''"> and ctModifier = #{ctModifier}</if>
|
|
|
+ <if test="ctModifieddate != null and ctModifieddate != ''"> and ctModifieddate = #{ctModifieddate}</if>
|
|
|
+ <if test="ctCreateddate != null and ctCreateddate != ''"> and ctCreateddate = #{ctCreateddate}</if>
|
|
|
+ <if test="ctDelstatus != null and ctDelstatus != ''"> and ctDelstatus = #{ctDelstatus}</if>
|
|
|
+ <if test="ctCreatorname != null and ctCreatorname != ''"> and ctCreatorname like concat('%', #{ctCreatorname}, '%')</if>
|
|
|
+ <if test="ctBiztype != null and ctBiztype != ''"> and ctBiztype = #{ctBiztype}</if>
|
|
|
+ <if test="ctBiztitle != null and ctBiztitle != ''"> and ctBiztitle = #{ctBiztitle}</if>
|
|
|
+ <if test="ctParam != null and ctParam != ''"> and ctParam = #{ctParam}</if>
|
|
|
+ <if test="ctCtime != null "> and ctCtime = #{ctCtime}</if>
|
|
|
+ <if test="ctDevcode != null "> and ctDevcode = #{ctDevcode}</if>
|
|
|
+ <if test="ctDevtype != null "> and ctDevtype = #{ctDevtype}</if>
|
|
|
+ <if test="ctLogtype != null "> and ctLogtype = #{ctLogtype}</if>
|
|
|
+ </where>
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectIotCmdtaskById" parameterType="Long" resultMap="IotCmdtaskResult">
|
|
|
+ <include refid="selectIotCmdtaskVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="selectIotCmdtaskByCtBid" resultType="com.yunfeiyun.agmp.iot.common.domain.IotCmdtask">
|
|
|
+ <include refid="selectIotCmdtaskVo"/>
|
|
|
+ where ctBid = #{ctBid}
|
|
|
+ limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertIotCmdtask" parameterType="IotCmdtask" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into IotCmdtask
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tid != null">tid,</if>
|
|
|
+ <if test="ctBid != null">ctBid,</if>
|
|
|
+ <if test="ctStatus != null">ctStatus,</if>
|
|
|
+ <if test="ctDescribe != null and ctDescribe != ''">ctDescribe,</if>
|
|
|
+ <if test="ctStartddate != null">ctStartddate,</if>
|
|
|
+ <if test="ctCompletedate != null">ctCompletedate,</if>
|
|
|
+ <if test="ctRequestid != null">ctRequestid,</if>
|
|
|
+ <if test="ctRequestSource != null and ctRequestSource != ''">ctRequestSource,</if>
|
|
|
+ <if test="ctRequestParam != null">ctRequestParam,</if>
|
|
|
+ <if test="ctReceiptstatus != null">ctReceiptstatus,</if>
|
|
|
+ <if test="ctReceiptddate != null">ctReceiptddate,</if>
|
|
|
+ <if test="ctReceiptaddr != null">ctReceiptaddr,</if>
|
|
|
+ <if test="ctCreator != null">ctCreator,</if>
|
|
|
+ <if test="ctModifier != null">ctModifier,</if>
|
|
|
+ <if test="ctModifieddate != null">ctModifieddate,</if>
|
|
|
+ <if test="ctCreateddate != null">ctCreateddate,</if>
|
|
|
+ <if test="ctDelstatus != null">ctDelstatus,</if>
|
|
|
+ <if test="ctCreatorname != null">ctCreatorname,</if>
|
|
|
+ <if test="ctBiztype != null">ctBiztype,</if>
|
|
|
+ <if test="ctBiztitle != null">ctBiztitle,</if>
|
|
|
+ <if test="ctParam != null">ctParam,</if>
|
|
|
+ <if test="ctCtime != null">ctCtime,</if>
|
|
|
+ <if test="ctDevcode != null">ctDevcode,</if>
|
|
|
+ <if test="ctDevtype != null">ctDevtype,</if>
|
|
|
+ <if test="ctLogtype != null">ctLogtype,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="tid != null">#{tid},</if>
|
|
|
+ <if test="ctBid != null">#{ctBid},</if>
|
|
|
+ <if test="ctStatus != null">#{ctStatus},</if>
|
|
|
+ <if test="ctDescribe != null and ctDescribe != ''">#{ctDescribe},</if>
|
|
|
+ <if test="ctStartddate != null">#{ctStartddate},</if>
|
|
|
+ <if test="ctCompletedate != null">#{ctCompletedate},</if>
|
|
|
+ <if test="ctRequestid != null">#{ctRequestid},</if>
|
|
|
+ <if test="ctRequestSource != null and ctRequestSource != ''">#{ctRequestSource},</if>
|
|
|
+ <if test="ctRequestParam != null">#{ctRequestParam},</if>
|
|
|
+ <if test="ctReceiptstatus != null">#{ctReceiptstatus},</if>
|
|
|
+ <if test="ctReceiptddate != null">#{ctReceiptddate},</if>
|
|
|
+ <if test="ctReceiptaddr != null">#{ctReceiptaddr},</if>
|
|
|
+ <if test="ctCreator != null">#{ctCreator},</if>
|
|
|
+ <if test="ctModifier != null">#{ctModifier},</if>
|
|
|
+ <if test="ctModifieddate != null">#{ctModifieddate},</if>
|
|
|
+ <if test="ctCreateddate != null">#{ctCreateddate},</if>
|
|
|
+ <if test="ctDelstatus != null">#{ctDelstatus},</if>
|
|
|
+ <if test="ctCreatorname != null">#{ctCreatorname},</if>
|
|
|
+ <if test="ctBiztype != null">#{ctBiztype},</if>
|
|
|
+ <if test="ctBiztitle != null">#{ctBiztitle},</if>
|
|
|
+ <if test="ctParam != null">#{ctParam},</if>
|
|
|
+ <if test="ctCtime != null">#{ctCtime},</if>
|
|
|
+ <if test="ctDevcode != null">#{ctDevcode},</if>
|
|
|
+ <if test="ctDevtype != null">#{ctDevtype},</if>
|
|
|
+ <if test="ctLogtype != null">#{ctLogtype},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateIotCmdtask" parameterType="IotCmdtask">
|
|
|
+ update IotCmdtask
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="tid != null">tid = #{tid},</if>
|
|
|
+ <if test="ctBid != null">ctBid = #{ctBid},</if>
|
|
|
+ <if test="ctStatus != null">ctStatus = #{ctStatus},</if>
|
|
|
+ <if test="ctDescribe != null and ctDescribe != ''">ctDescribe = #{ctDescribe},</if>
|
|
|
+ <if test="ctStartddate != null">ctStartddate = #{ctStartddate},</if>
|
|
|
+ <if test="ctCompletedate != null">ctCompletedate = #{ctCompletedate},</if>
|
|
|
+ <if test="ctRequestid != null">ctRequestid = #{ctRequestid},</if>
|
|
|
+ <if test="ctRequestSource != null and ctRequestSource != ''">ctRequestSource = #{ctRequestSource},</if>
|
|
|
+ <if test="ctRequestParam != null">ctRequestParam = #{ctRequestParam},</if>
|
|
|
+ <if test="ctReceiptstatus != null">ctReceiptstatus = #{ctReceiptstatus},</if>
|
|
|
+ <if test="ctReceiptddate != null">ctReceiptddate = #{ctReceiptddate},</if>
|
|
|
+ <if test="ctReceiptaddr != null">ctReceiptaddr = #{ctReceiptaddr},</if>
|
|
|
+ <if test="ctCreator != null">ctCreator = #{ctCreator},</if>
|
|
|
+ <if test="ctModifier != null">ctModifier = #{ctModifier},</if>
|
|
|
+ <if test="ctModifieddate != null">ctModifieddate = #{ctModifieddate},</if>
|
|
|
+ <if test="ctCreateddate != null">ctCreateddate = #{ctCreateddate},</if>
|
|
|
+ <if test="ctDelstatus != null">ctDelstatus = #{ctDelstatus},</if>
|
|
|
+ <if test="ctCreatorname != null">ctCreatorname = #{ctCreatorname},</if>
|
|
|
+ <if test="ctBiztype != null">ctBiztype = #{ctBiztype},</if>
|
|
|
+ <if test="ctBiztitle != null">ctBiztitle = #{ctBiztitle},</if>
|
|
|
+ <if test="ctParam != null">ctParam = #{ctParam},</if>
|
|
|
+ <if test="ctCtime != null">ctCtime = #{ctCtime},</if>
|
|
|
+ <if test="ctDevcode != null">ctDevcode = #{ctDevcode},</if>
|
|
|
+ <if test="ctDevtype != null">ctDevtype = #{ctDevtype},</if>
|
|
|
+ <if test="ctLogtype != null">ctLogtype = #{ctLogtype},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteIotCmdtaskById" parameterType="Long">
|
|
|
+ delete from IotCmdtask where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteIotCmdtaskByIds" parameterType="String">
|
|
|
+ delete from IotCmdtask where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|