T139 History table draft created

This commit is contained in:
2021-03-17 15:58:40 +01:00
parent a9ce408b80
commit 4ad48419df
6 changed files with 82 additions and 17 deletions

View File

@@ -28,18 +28,13 @@ import java.util.UUID;
*/
@Slf4j
@RestController
@RequestMapping(path = "/event")
@RequestMapping(path = "/api/event")
@AllArgsConstructor
public class EventController {
private final EtrackService service;
@GetMapping
public ResponseEntity getHistory(@RequestBody(required = false) EventRequestDto event){
event = EventRequestDto.builder()
.localDateTimeFrom(LocalDateTime.of(2021, 3, 3, 10, 1))
.localDateTimeTo(LocalDateTime.of(2021, 3, 30, 19, 40))
.clientUUID(UUID.fromString("68f98c04-403c-4344-bed2-1db779a15ead"))
.build();
public ResponseEntity getHistory(@RequestBody EventRequestDto event){
return new ResponseEntity(service.getEventsByDateTimeAndBusinessKeys(event), HttpStatus.OK);
}
}