| | |
| | | |
| | | import kr.wisestone.owl.domain.UserDepartment; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.Query; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import javax.transaction.Transactional; |
| | | import java.util.List; |
| | | |
| | | public interface UserDepartmentRepository extends JpaRepository<UserDepartment, Long> { |
| | | List<UserDepartment> findByUserId(Long userId); |
| | | |
| | | List<UserDepartment> findByDepartmentId(Long departmentId); |
| | | |
| | | @Transactional |
| | | void removeByUserId(@Param("userId") Long userId); |
| | | } |