<?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="SXzglDownloadManagementMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSXzglDownloadManagementList" parameterType="pd" resultType="pd">
        select * from s_xzgl_download_management where 1=1
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
        <if test="createdBy !=null and createdBy !='' ">
            and createdBy = #{createdBy}
        </if>
        <if test="createdDate !=null and createdDate !='' ">
            and createdDate = #{createdDate}
        </if>
        <if test="lastModifiedBy !=null and lastModifiedBy !='' ">
            and lastModifiedBy = #{lastModifiedBy}
        </if>
        <if test="lastModifiedDate !=null and lastModifiedDate !='' ">
            and lastModifiedDate = #{lastModifiedDate}
        </if>
        <if test="businessId !=null and businessId !='' ">
            and businessId = #{businessId}
        </if>
        <if test="type !=null and type !='' ">
            and type = #{type}
        </if>
        <if test="name !=null and name !='' ">
            and name = #{name}
        </if>
        <if test="platformType !=null and platformType !='' ">
            and platformType = #{platformType}
        </if>
        <if test="fileName !=null and fileName !='' ">
            and fileName = #{fileName}
        </if>
        <if test="filePlace !=null and filePlace !='' ">
            and filePlace = #{filePlace}
        </if>
        <if test="fileUrl !=null and fileUrl !='' ">
            and fileUrl = #{fileUrl}
        </if>
        <if test="reason !=null and reason !='' ">
            and reason = #{reason}
        </if>
        <if test="status !=null and status !='' ">
            and status = #{status}
        </if>
        <if test="requestUrl !=null and requestUrl !='' ">
            and requestUrl = #{requestUrl}
        </if>
        <if test="requestParam !=null and requestParam !='' ">
            and requestParam = #{requestParam}
        </if>
        <if test="requestType !=null and requestType !='' ">
            and requestType = #{requestType}
        </if>
        <if test="extend !=null and extend !='' ">
            and extend = #{extend}
        </if>
        <if test="extendJson !=null and extendJson !='' ">
            and extendJson = #{extendJson}
        </if>
        <if test="version !=null and version !='' ">
            and version = #{version}
        </if>
        <if test="startTime !=null and startTime !='' ">
            and startTime = #{startTime}
        </if>
        <if test="endTime !=null and endTime !='' ">
            and endTime = #{endTime}
        </if>
        <if test="canReload !=null and canReload !='' ">
            and canReload = #{canReload}
        </if>
        <if test="createName !=null and createName !='' ">
            and createName = #{createName}
        </if>
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
    </select>


    <update id="updateSXzglDownloadManagement" parameterType="pd" >
        update s_xzgl_download_management
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="createdBy !=null and createdBy !='' ">
            createdBy = #{createdBy},
        </if>
        <if test="createdDate !=null and createdDate !='' ">
            createdDate = #{createdDate},
        </if>
        <if test="lastModifiedBy !=null and lastModifiedBy !='' ">
            lastModifiedBy = #{lastModifiedBy},
        </if>
        <if test="lastModifiedDate !=null and lastModifiedDate !='' ">
            lastModifiedDate = #{lastModifiedDate},
        </if>
        <if test="businessId !=null and businessId !='' ">
            businessId = #{businessId},
        </if>
        <if test="type !=null and type !='' ">
            type = #{type},
        </if>
        <if test="name !=null and name !='' ">
            name = #{name},
        </if>
        <if test="platformType !=null and platformType !='' ">
            platformType = #{platformType},
        </if>
        <if test="fileName !=null and fileName !='' ">
            fileName = #{fileName},
        </if>
        <if test="filePlace !=null and filePlace !='' ">
            filePlace = #{filePlace},
        </if>
        <if test="fileUrl !=null and fileUrl !='' ">
            fileUrl = #{fileUrl},
        </if>
        <if test="reason !=null and reason !='' ">
            reason = #{reason},
        </if>
        <if test="status !=null and status !='' ">
            status = #{status},
        </if>
        <if test="requestUrl !=null and requestUrl !='' ">
            requestUrl = #{requestUrl},
        </if>
        <if test="requestParam !=null and requestParam !='' ">
            requestParam = #{requestParam},
        </if>
        <if test="requestType !=null and requestType !='' ">
            requestType = #{requestType},
        </if>
        <if test="extend !=null and extend !='' ">
            extend = #{extend},
        </if>
        <if test="extendJson !=null and extendJson !='' ">
            extendJson = #{extendJson},
        </if>
        <if test="version !=null and version !='' ">
            version = #{version},
        </if>
        <if test="startTime !=null and startTime !='' ">
            startTime = #{startTime},
        </if>
        <if test="endTime !=null and endTime !='' ">
            endTime = #{endTime},
        </if>
        <if test="canReload !=null and canReload !='' ">
            canReload = #{canReload},
        </if>
        <if test="createName !=null and createName !='' ">
            createName = #{createName},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SXzglDownloadManagementRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_xzgl_download_management where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSXzglDownloadManagement" parameterType="pd" >

        insert into s_xzgl_download_management
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="createdBy !=null and createdBy !='' ">
            createdBy,
        </if>
        <if test="createdDate !=null and createdDate !='' ">
            createdDate,
        </if>
        <if test="lastModifiedBy !=null and lastModifiedBy !='' ">
            lastModifiedBy,
        </if>
        <if test="lastModifiedDate !=null and lastModifiedDate !='' ">
            lastModifiedDate,
        </if>
        <if test="businessId !=null and businessId !='' ">
            businessId,
        </if>
        <if test="type !=null and type !='' ">
            type,
        </if>
        <if test="name !=null and name !='' ">
            name,
        </if>
        <if test="platformType !=null and platformType !='' ">
            platformType,
        </if>
        <if test="fileName !=null and fileName !='' ">
            fileName,
        </if>
        <if test="filePlace !=null and filePlace !='' ">
            filePlace,
        </if>
        <if test="fileUrl !=null and fileUrl !='' ">
            fileUrl,
        </if>
        <if test="reason !=null and reason !='' ">
            reason,
        </if>
        <if test="status !=null and status !='' ">
            status,
        </if>
        <if test="requestUrl !=null and requestUrl !='' ">
            requestUrl,
        </if>
        <if test="requestParam !=null and requestParam !='' ">
            requestParam,
        </if>
        <if test="requestType !=null and requestType !='' ">
            requestType,
        </if>
        <if test="extend !=null and extend !='' ">
            extend,
        </if>
        <if test="extendJson !=null and extendJson !='' ">
            extendJson,
        </if>
        <if test="version !=null and version !='' ">
            version,
        </if>
        <if test="startTime !=null and startTime !='' ">
            startTime,
        </if>
        <if test="endTime !=null and endTime !='' ">
            endTime,
        </if>
        <if test="canReload !=null and canReload !='' ">
            canReload,
        </if>
        <if test="createName !=null and createName !='' ">
            createName,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="createdBy !=null and createdBy !='' ">
             #{createdBy},
        </if>
        <if test="createdDate !=null and createdDate !='' ">
             #{createdDate},
        </if>
        <if test="lastModifiedBy !=null and lastModifiedBy !='' ">
             #{lastModifiedBy},
        </if>
        <if test="lastModifiedDate !=null and lastModifiedDate !='' ">
             #{lastModifiedDate},
        </if>
        <if test="businessId !=null and businessId !='' ">
             #{businessId},
        </if>
        <if test="type !=null and type !='' ">
             #{type},
        </if>
        <if test="name !=null and name !='' ">
             #{name},
        </if>
        <if test="platformType !=null and platformType !='' ">
             #{platformType},
        </if>
        <if test="fileName !=null and fileName !='' ">
             #{fileName},
        </if>
        <if test="filePlace !=null and filePlace !='' ">
             #{filePlace},
        </if>
        <if test="fileUrl !=null and fileUrl !='' ">
             #{fileUrl},
        </if>
        <if test="reason !=null and reason !='' ">
             #{reason},
        </if>
        <if test="status !=null and status !='' ">
             #{status},
        </if>
        <if test="requestUrl !=null and requestUrl !='' ">
             #{requestUrl},
        </if>
        <if test="requestParam !=null and requestParam !='' ">
             #{requestParam},
        </if>
        <if test="requestType !=null and requestType !='' ">
             #{requestType},
        </if>
        <if test="extend !=null and extend !='' ">
             #{extend},
        </if>
        <if test="extendJson !=null and extendJson !='' ">
             #{extendJson},
        </if>
        <if test="version !=null and version !='' ">
             #{version},
        </if>
        <if test="startTime !=null and startTime !='' ">
             #{startTime},
        </if>
        <if test="endTime !=null and endTime !='' ">
             #{endTime},
        </if>
        <if test="canReload !=null and canReload !='' ">
             #{canReload},
        </if>
        <if test="createName !=null and createName !='' ">
             #{createName},
        </if>
        </trim>

    </insert>

</mapper>
