<?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="cn.cecep.talroad.mapper.BasDeviceInfoOperationLogMapper">
    <resultMap id="BaseResultMap" type="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        <!--@Table bas_device_info_operation_log-->
        <id column="log_id" jdbcType="VARCHAR" property="logId"/>
        <result column="operation_time" jdbcType="TIMESTAMP" property="operationTime"/>
        <result column="elec_device_name" jdbcType="VARCHAR" property="elecDeviceName"/>
        <result column="before_modify_name" jdbcType="VARCHAR" property="beforeModifyName"/>
        <result column="before_modify_code" jdbcType="VARCHAR" property="beforeModifyCode"/>
        <result column="operation_status" jdbcType="VARCHAR" property="operationStatus"/>
        <result column="after_modify_name" jdbcType="VARCHAR" property="afterModifyName"/>
        <result column="after_modify_code" jdbcType="VARCHAR" property="afterModifyCode"/>
        <result column="operator" jdbcType="VARCHAR" property="operator"/>
        <result column="monitoring_point_type" jdbcType="VARCHAR" property="monitoringPointType"/>
        <result column="operator_id" jdbcType="VARCHAR" property="operatorId"/>
        <result column="factory_id" jdbcType="VARCHAR" property="factoryId"/>
    </resultMap>
    <sql id="Base_Column_List">
        <!--@mbg.generated-->
        log_id,
        operation_time,
        elec_device_name,
        before_modify_name,
        before_modify_code,
        operation_status,
        after_modify_name,
        after_modify_code,
        "operator",
        monitoring_point_type,
        operator_id,
        factory_id
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        <!--@mbg.generated-->
        select
        <include refid="Base_Column_List"/>
        from bas_device_info_operation_log
        where log_id = #{logId,jdbcType=VARCHAR}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        <!--@mbg.generated-->
        delete
        from bas_device_info_operation_log
        where log_id = #{logId,jdbcType=VARCHAR}
    </delete>
    <insert id="insert" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        insert into bas_device_info_operation_log (log_id, operation_time, elec_device_name,
                                                   before_modify_name, before_modify_code, operation_status,
                                                   after_modify_name, after_modify_code, "operator",
                                                   monitoring_point_type, operator_id, factory_id)
        values (#{logId,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}, #{elecDeviceName,jdbcType=VARCHAR},
                #{beforeModifyName,jdbcType=VARCHAR}, #{beforeModifyCode,jdbcType=VARCHAR},
                #{operationStatus,jdbcType=VARCHAR},
                #{afterModifyName,jdbcType=VARCHAR}, #{afterModifyCode,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR},
                #{monitoringPointType,jdbcType=VARCHAR}, #{operatorId,jdbcType=VARCHAR}, #{factoryId,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        insert into bas_device_info_operation_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="logId != null and logId != ''">
                log_id,
            </if>
            <if test="operationTime != null">
                operation_time,
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                elec_device_name,
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                before_modify_name,
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                before_modify_code,
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                operation_status,
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                after_modify_name,
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                after_modify_code,
            </if>
            <if test="operator != null and operator != ''">
                "operator",
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                monitoring_point_type,
            </if>
            <if test="operatorId != null and operatorId != ''">
                operator_id,
            </if>
            <if test="factoryId != null and factoryId != ''">
                factory_id,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="logId != null and logId != ''">
                #{logId,jdbcType=VARCHAR},
            </if>
            <if test="operationTime != null">
                #{operationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                #{elecDeviceName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                #{beforeModifyName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                #{beforeModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                #{operationStatus,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                #{afterModifyName,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                #{afterModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operator != null and operator != ''">
                #{operator,jdbcType=VARCHAR},
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                #{monitoringPointType,jdbcType=VARCHAR},
            </if>
            <if test="operatorId != null and operatorId != ''">
                #{operatorId,jdbcType=VARCHAR},
            </if>
            <if test="factoryId != null and factoryId != ''">
                #{factoryId,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        update bas_device_info_operation_log
        <set>
            <if test="operationTime != null">
                operation_time = #{operationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                elec_device_name = #{elecDeviceName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                before_modify_name = #{beforeModifyName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                before_modify_code = #{beforeModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                operation_status = #{operationStatus,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                after_modify_name = #{afterModifyName,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                after_modify_code = #{afterModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operator != null and operator != ''">
                "operator" = #{operator,jdbcType=VARCHAR},
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                monitoring_point_type = #{monitoringPointType,jdbcType=VARCHAR},
            </if>
            <if test="operatorId != null and operatorId != ''">
                operator_id = #{operatorId,jdbcType=VARCHAR},
            </if>
            <if test="factoryId != null and factoryId != ''">
                factory_id = #{factoryId,jdbcType=VARCHAR},
            </if>
        </set>
        where log_id = #{logId,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKey" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        update bas_device_info_operation_log
        set operation_time        = #{operationTime,jdbcType=TIMESTAMP},
            elec_device_name      = #{elecDeviceName,jdbcType=VARCHAR},
            before_modify_name    = #{beforeModifyName,jdbcType=VARCHAR},
            before_modify_code    = #{beforeModifyCode,jdbcType=VARCHAR},
            operation_status      = #{operationStatus,jdbcType=VARCHAR},
            after_modify_name     = #{afterModifyName,jdbcType=VARCHAR},
            after_modify_code     = #{afterModifyCode,jdbcType=VARCHAR},
            "operator"            = #{operator,jdbcType=VARCHAR},
            monitoring_point_type = #{monitoringPointType,jdbcType=VARCHAR},
            operator_id           = #{operatorId,jdbcType=VARCHAR},
            factory_id            = #{factoryId,jdbcType=VARCHAR}
        where log_id = #{logId,jdbcType=VARCHAR}
    </update>
    <update id="updateBatch" parameterType="java.util.List">
        <!--@mbg.generated-->
        update bas_device_info_operation_log
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="operation_time = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operationTime,jdbcType=TIMESTAMP}
                </foreach>
            </trim>
            <trim prefix="elec_device_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.elecDeviceName,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="before_modify_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.beforeModifyName,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="before_modify_code = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.beforeModifyCode,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="operation_status = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operationStatus,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="after_modify_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.afterModifyName,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="after_modify_code = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.afterModifyCode,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="&quot;operator&quot; = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operator,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="monitoring_point_type = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.monitoringPointType,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="operator_id = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operatorId,jdbcType=VARCHAR}
                </foreach>
            </trim>
            <trim prefix="factory_id = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.factoryId,jdbcType=VARCHAR}
                </foreach>
            </trim>
        </trim>
        where log_id in
        <foreach close=")" collection="list" item="item" open="(" separator=", ">
            #{item.logId,jdbcType=VARCHAR}
        </foreach>
    </update>
    <update id="updateBatchSelective" parameterType="java.util.List">
        <!--@mbg.generated-->
        update bas_device_info_operation_log
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="operation_time = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.operationTime != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operationTime,jdbcType=TIMESTAMP}
                    </if>
                </foreach>
            </trim>
            <trim prefix="elec_device_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.elecDeviceName != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.elecDeviceName,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="before_modify_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.beforeModifyName != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.beforeModifyName,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="before_modify_code = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.beforeModifyCode != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.beforeModifyCode,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="operation_status = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.operationStatus != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operationStatus,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="after_modify_name = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.afterModifyName != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.afterModifyName,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="after_modify_code = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.afterModifyCode != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.afterModifyCode,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="&quot;operator&quot; = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.operator != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operator,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="monitoring_point_type = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.monitoringPointType != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.monitoringPointType,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="operator_id = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.operatorId != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.operatorId,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
            <trim prefix="factory_id = case" suffix="end,">
                <foreach collection="list" index="index" item="item">
                    <if test="item.factoryId != null">
                        when log_id = #{item.logId,jdbcType=VARCHAR} then #{item.factoryId,jdbcType=VARCHAR}
                    </if>
                </foreach>
            </trim>
        </trim>
        where log_id in
        <foreach close=")" collection="list" item="item" open="(" separator=", ">
            #{item.logId,jdbcType=VARCHAR}
        </foreach>
    </update>
    <insert id="batchInsert" parameterType="map">
        <!--@mbg.generated-->
        insert into bas_device_info_operation_log
        (log_id, operation_time, elec_device_name, before_modify_name, before_modify_code,
         operation_status, after_modify_name, after_modify_code, "operator", monitoring_point_type,
         operator_id, factory_id)
        values
        <foreach collection="list" item="item" separator=",">
            (#{item.logId,jdbcType=VARCHAR}, #{item.operationTime,jdbcType=TIMESTAMP},
             #{item.elecDeviceName,jdbcType=VARCHAR},
             #{item.beforeModifyName,jdbcType=VARCHAR}, #{item.beforeModifyCode,jdbcType=VARCHAR},
             #{item.operationStatus,jdbcType=VARCHAR}, #{item.afterModifyName,jdbcType=VARCHAR},
             #{item.afterModifyCode,jdbcType=VARCHAR}, #{item.operator,jdbcType=VARCHAR},
             #{item.monitoringPointType,jdbcType=VARCHAR},
             #{item.operatorId,jdbcType=VARCHAR}, #{item.factoryId,jdbcType=VARCHAR})
        </foreach>
    </insert>
    <insert id="insertOrUpdate" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        insert into bas_device_info_operation_log
        (log_id, operation_time, elec_device_name, before_modify_name, before_modify_code,
         operation_status, after_modify_name, after_modify_code, "operator", monitoring_point_type,
         operator_id, factory_id)
        values (#{logId,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}, #{elecDeviceName,jdbcType=VARCHAR},
                #{beforeModifyName,jdbcType=VARCHAR}, #{beforeModifyCode,jdbcType=VARCHAR},
                #{operationStatus,jdbcType=VARCHAR},
                #{afterModifyName,jdbcType=VARCHAR}, #{afterModifyCode,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR},
                #{monitoringPointType,jdbcType=VARCHAR}, #{operatorId,jdbcType=VARCHAR},
                #{factoryId,jdbcType=VARCHAR}) on duplicate key
        update
            log_id = #{logId,jdbcType=VARCHAR},
            operation_time = #{operationTime,jdbcType=TIMESTAMP},
            elec_device_name = #{elecDeviceName,jdbcType=VARCHAR},
            before_modify_name = #{beforeModifyName,jdbcType=VARCHAR},
            before_modify_code = #{beforeModifyCode,jdbcType=VARCHAR},
            operation_status = #{operationStatus,jdbcType=VARCHAR},
            after_modify_name = #{afterModifyName,jdbcType=VARCHAR},
            after_modify_code = #{afterModifyCode,jdbcType=VARCHAR},
            "operator" = #{operator,jdbcType=VARCHAR},
            monitoring_point_type = #{monitoringPointType,jdbcType=VARCHAR},
            operator_id = #{operatorId,jdbcType=VARCHAR},
            factory_id = #{factoryId,jdbcType=VARCHAR}
    </insert>
    <insert id="insertOrUpdateSelective" parameterType="cn.cecep.talroad.domain.BasDeviceInfoOperationLog">
        <!--@mbg.generated-->
        insert into bas_device_info_operation_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="logId != null and logId != ''">
                log_id,
            </if>
            <if test="operationTime != null">
                operation_time,
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                elec_device_name,
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                before_modify_name,
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                before_modify_code,
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                operation_status,
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                after_modify_name,
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                after_modify_code,
            </if>
            <if test="operator != null and operator != ''">
                "operator",
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                monitoring_point_type,
            </if>
            <if test="operatorId != null and operatorId != ''">
                operator_id,
            </if>
            <if test="factoryId != null and factoryId != ''">
                factory_id,
            </if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="logId != null and logId != ''">
                #{logId,jdbcType=VARCHAR},
            </if>
            <if test="operationTime != null">
                #{operationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                #{elecDeviceName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                #{beforeModifyName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                #{beforeModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                #{operationStatus,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                #{afterModifyName,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                #{afterModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operator != null and operator != ''">
                #{operator,jdbcType=VARCHAR},
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                #{monitoringPointType,jdbcType=VARCHAR},
            </if>
            <if test="operatorId != null and operatorId != ''">
                #{operatorId,jdbcType=VARCHAR},
            </if>
            <if test="factoryId != null and factoryId != ''">
                #{factoryId,jdbcType=VARCHAR},
            </if>
        </trim>
        on duplicate key update
        <trim suffixOverrides=",">
            <if test="logId != null and logId != ''">
                log_id = #{logId,jdbcType=VARCHAR},
            </if>
            <if test="operationTime != null">
                operation_time = #{operationTime,jdbcType=TIMESTAMP},
            </if>
            <if test="elecDeviceName != null and elecDeviceName != ''">
                elec_device_name = #{elecDeviceName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyName != null and beforeModifyName != ''">
                before_modify_name = #{beforeModifyName,jdbcType=VARCHAR},
            </if>
            <if test="beforeModifyCode != null and beforeModifyCode != ''">
                before_modify_code = #{beforeModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operationStatus != null and operationStatus != ''">
                operation_status = #{operationStatus,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyName != null and afterModifyName != ''">
                after_modify_name = #{afterModifyName,jdbcType=VARCHAR},
            </if>
            <if test="afterModifyCode != null and afterModifyCode != ''">
                after_modify_code = #{afterModifyCode,jdbcType=VARCHAR},
            </if>
            <if test="operator != null and operator != ''">
                "operator" = #{operator,jdbcType=VARCHAR},
            </if>
            <if test="monitoringPointType != null and monitoringPointType != ''">
                monitoring_point_type = #{monitoringPointType,jdbcType=VARCHAR},
            </if>
            <if test="operatorId != null and operatorId != ''">
                operator_id = #{operatorId,jdbcType=VARCHAR},
            </if>
            <if test="factoryId != null and factoryId != ''">
                factory_id = #{factoryId,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>

    <select id="selectListByParam" resultMap="BaseResultMap">
        SELECT
            <include refid="Base_Column_List"/>
        FROM bas_device_info_operation_log
        <where>
            monitoring_point_type = #{dto.queryType}
            AND factory_id = #{dto.factoryId}
            <if test="dto.deviceName != null and dto.deviceName != ''">
                AND elec_device_name LIKE CONCAT('%', #{dto.deviceName}, '%')
            </if>
            <if test="dto.pollutantName != null and dto.pollutantName != ''">
                AND (before_modify_name LIKE CONCAT('%', #{dto.pollutantName}, '%') OR after_modify_name LIKE CONCAT('%', #{dto.pollutantName}, '%'))
            </if>
            <if test="dto.pollutantCode != null and dto.pollutantCode !=''">
                AND (before_modify_code LIKE CONCAT('%', #{dto.pollutantCode}, '%') OR after_modify_code LIKE CONCAT('%', #{dto.pollutantCode}, '%'))
            </if>
            <if test="startTime != null">
                AND operation_time &gt;= #{startTime}
            </if>
            <if test="endTime != null">
                AND operation_time &lt;= #{endTime}
            </if>
        </where>
        ORDER BY operation_time DESC
    </select>
</mapper>