<?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.effective.PCodeIndexPollutantMapper">
    <select id="findIdByColumn" resultType="java.lang.Integer">
      SELECT
            pk_id
        FROM  p_code_index_pollutant
        WHERE
            target_calc = 1 AND field = #{column}
    </select>

    <select id="findTargetPollutant" resultType="cn.cecep.talroad.domain.effective.PCodeIndexPollutant">
        SELECT * FROM p_code_index_pollutant WHERE target_calc = 1
    </select>
    <select id="findWinterPollutant" resultType="cn.cecep.talroad.domain.effective.PCodeIndexPollutant">
         SELECT * FROM p_code_index_pollutant WHERE winter_calc = 1
    </select>
    <select id="findNameByColumn" resultType="java.lang.String">
         SELECT
            name
        FROM
            p_code_index_pollutant
        WHERE
            target_calc = 1
            AND field = #{column}
    </select>
</mapper>
