<?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.nantian.cloud.jljc.mapper.DischargeEnergyAuditMapper">
    <sql id="tableName">
        t_discharge_energy_audit
    </sql>

    <sql id="baseColumn">
        id,item_type,item_name,item_id,enterprise,county,city,province
    </sql>
    <select id="getPageData" resultType="com.nantian.cloud.jljc.entity.DischargeEnergyAudit">
        select *
        from t_discharge_energy_audit
        <trim prefix="where"  prefixOverrides="and">
            <if test="query.itemName != null">
                and item_name = #{query.itemName}
            </if>
            <if test="query.itemType != null">
                and item_type = #{query.itemType}
            </if>
            <if test="query.delFlag != null">
                and del_flag = #{query.delFlag}
            </if>
            <if test="query.year != null">
                and year = #{query.year}
            </if>
            <if test="query.quarter != null">
                and quarter = #{query.quarter}
            </if>
            <if test="query.itemId != null">
                and item_id = #{query.itemId}
            </if>
        </trim>
    </select>

</mapper>