SQL korrigiert
This commit is contained in:
parent
ae7dca5284
commit
45ded979d5
@ -38,7 +38,7 @@ class VzRestController {
|
|||||||
List<Aggregate> getLatestData(
|
List<Aggregate> getLatestData(
|
||||||
@RequestParam("houseId")final int houseId,
|
@RequestParam("houseId")final int houseId,
|
||||||
@RequestParam("timeWindow")final int timeWindow) {
|
@RequestParam("timeWindow")final int timeWindow) {
|
||||||
return jdbcTemplate.query("SELECT * FROM tobias_aggregate2 WHERE houseId=? ORDER BY timestamp_start DESC LIMIT ?;",
|
return jdbcTemplate.query("SELECT * FROM tobias_aggregate2 WHERE house_id=? ORDER BY timestamp_start DESC LIMIT ?;",
|
||||||
(rs, rowNum) -> new Aggregate(houseId, rs.getLong("timestamp_start"), rs.getLong("timestamp_end"), rs.getLong("produced_energy"), rs.getLong("obtained_energy"), rs.getLong("injected_energy")),
|
(rs, rowNum) -> new Aggregate(houseId, rs.getLong("timestamp_start"), rs.getLong("timestamp_end"), rs.getLong("produced_energy"), rs.getLong("obtained_energy"), rs.getLong("injected_energy")),
|
||||||
houseId, timeWindow);
|
houseId, timeWindow);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user