DAO内容:
List<ItEquipmentHeadersCustom> selectByListLocationId(@Param("locationIdList")List<Integer> locationIdList);
XML文件内容:
<select id="selectByListLocationId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM IT.IT_EQUIPMENT_HEADERS ieh
where LOCATION_ID in
<foreach item="item" index="index" open="(" separator="," close=")" collection="locationIdList">
#{item}
</foreach>
</select>