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
|
Line | |
---|
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
|
---|
13 | public interface ConfirmationTokenRepositoryRP extends JpaRepository<ConfirmationTokenRP,Integer> {
|
---|
14 |
|
---|
15 | Optional<ConfirmationTokenRP> findByToken(String token);
|
---|
16 |
|
---|
17 | void deleteByRegisteredUser_RegParkId(int regParkId);
|
---|
18 |
|
---|
19 | @Transactional
|
---|
20 | @Modifying
|
---|
21 | @Query("UPDATE ConfirmationTokenRP c " +
|
---|
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.