dev/2025-02-19-15-52

This commit is contained in:
geniy 2025-02-19 15:52:15 +03:00
parent 4bf67bef55
commit 2c55a0c177
2 changed files with 4 additions and 0 deletions

View File

@ -6,11 +6,13 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Optional;
@Repository
public interface EmployeeDataRepository extends JpaRepository<EmployeeData, Long> {
Optional<EmployeeData> findByOwnerId(long ownerId);
@Query(value = "select e.id from employee_data e where owner_id = :owner_id", nativeQuery = true)

View File

@ -3,6 +3,8 @@ package com.example.nto.repository;
import com.example.nto.entity.Code;
import com.example.nto.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface RoleRepository extends JpaRepository<Role, Long> {
}