Last change
on this file since 0c049e9 was 9dd526f, checked in by andrejTavchioski <andrej.tavchioski@…>, 3 years ago |
backend refactoring
|
-
Property mode
set to
100644
|
File size:
813 bytes
|
Rev | Line | |
---|
[ce6ad22] | 1 | package parkup.configs.token;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
| 4 | import org.springframework.data.jpa.repository.Modifying;
|
---|
| 5 | import org.springframework.data.jpa.repository.Query;
|
---|
| 6 | import org.springframework.stereotype.Repository;
|
---|
| 7 |
|
---|
| 8 | import javax.transaction.Transactional;
|
---|
| 9 | import java.time.LocalDateTime;
|
---|
| 10 | import java.util.Optional;
|
---|
| 11 |
|
---|
| 12 | @Repository
|
---|
[97fbc67] | 13 | public interface ConfirmationTokenRepositoryRP extends JpaRepository<ConfirmationTokenRP,Integer> {
|
---|
[ce6ad22] | 14 |
|
---|
[97fbc67] | 15 | Optional<ConfirmationTokenRP> findByToken(String token);
|
---|
| 16 |
|
---|
[9dd526f] | 17 | void deleteByRegisteredUser_RegParkId(int regParkId);
|
---|
[ce6ad22] | 18 |
|
---|
| 19 | @Transactional
|
---|
| 20 | @Modifying
|
---|
[97fbc67] | 21 | @Query("UPDATE ConfirmationTokenRP c " +
|
---|
[ce6ad22] | 22 | "SET c.confirmedAt = ?2 " +
|
---|
| 23 | "WHERE c.token = ?1")
|
---|
| 24 | int updateConfirmedAt(String token, LocalDateTime confirmedAt);
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.