<?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.PcYieldTrendMapper">
  <resultMap id="BaseResultMap" type="cn.cecep.talroad.domain.PcYieldTrend">
    <!--@mbg.generated-->
    <!--@Table pc_yield_trend-->
    <result column="dict_id" jdbcType="BIGINT" property="dictId" />
    <result column="large" jdbcType="VARCHAR" property="large" />
    <result column="small" jdbcType="VARCHAR" property="small" />
    <result column="open" jdbcType="SMALLINT" property="open" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="industry" jdbcType="VARCHAR" property="industry" />
    <result column="unit" jdbcType="VARCHAR" property="unit" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    dict_id, "large", small, "open", code, industry, unit
  </sql>

  <select id="selectByFactoryId" resultMap="BaseResultMap">
    SELECT
      <include refid="Base_Column_List"/>
    FROM pc_yield_trend pyt
      LEFT JOIN pc_factory pf ON pf.industry_category = pyt.industry
    WHERE pf.id = #{factoryId}
  </select>
</mapper>
