1

created first API implementation

This commit is contained in:
LukasEttel
2020-03-12 13:52:50 +01:00
parent f8237853a8
commit c6c62b07bf
5 changed files with 63 additions and 65 deletions

View File

@ -1,9 +1,14 @@
package mops.gruppen2.repository;
import mops.gruppen2.domain.EventDTO;
import mops.gruppen2.domain.event.Event;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface EventRepository extends CrudRepository<EventDTO, Long> {
@Query("SELECT * FROM event WHERE event_id > ?#{[0]}")
public Iterable<EventDTO> findNewEventSinceStatus(@Param("status") Long status);
}