<!-- 查詢 設備List 的 某天,而且小於當前小時的,耗電 記錄 -->
<select id="findByDeviceIdInAndBetweenRecordTime" resultType="cn.com.platform.entity.RecordElectricityEntity">
select * from
<!-- power_record_electricity_${tableYear} c -->
power_record_electricity c
where c.deviceId in
<foreach collection="deviceList" index="index" item="item" open="(" separator="," close=")">
#{item.id}
</foreach>
and c.recordTime
>=#{startTime}orm
and c.recordTime <= #{endTime}ci
</select>it