<?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.interplug.qcast.biz.module.ModuleInfoMapper">
    <select id="getModulesByRoofMaterialIdAndTrestleId" parameterType="integer" resultType="com.interplug.qcast.biz.module.dto.ModuleInfoResponse">
        SELECT B.ID
             , B.NAME
          FROM TB_MAP_ROOF_MATERIAL_TRESTLE_MODULE A
          JOIN TB_MODULE B
            ON A.MODULE_ID = B.ID
         WHERE A.ROOF_MATERIAL_ID = #{roofMaterialId}
           AND A.TRESTLE_ID =       #{trestleId}
    </select>
</mapper>