2020-07-03 12:09:22 +02:00
|
|
|
package eu.dnetlib.organizations.repository;
|
|
|
|
|
2020-11-12 15:47:41 +01:00
|
|
|
import java.time.OffsetDateTime;
|
|
|
|
|
2020-07-03 12:09:22 +02:00
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
2020-11-12 15:47:41 +01:00
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
|
|
import org.springframework.data.jpa.repository.Query;
|
2020-07-03 12:09:22 +02:00
|
|
|
|
|
|
|
import eu.dnetlib.organizations.model.User;
|
|
|
|
|
|
|
|
public interface UserRepository extends JpaRepository<User, String> {
|
|
|
|
|
2020-11-12 15:47:41 +01:00
|
|
|
@Modifying
|
2022-09-19 14:33:22 +02:00
|
|
|
@Query("update User set fullname = ?2, organization = ?3, last_access = ?4 where email = ?1")
|
|
|
|
void updateDetails(final String email, final String fullname, final String organization, OffsetDateTime now);
|
2020-11-12 15:47:41 +01:00
|
|
|
|
2020-07-03 12:09:22 +02:00
|
|
|
}
|