OWL ITS + 탐지시스템(인터넷 진흥원)
박지현
2022-03-11 d3d9848c0833a0835eb2fac8345c0e406e066535
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package kr.wisestone.owl.repository;
 
import kr.wisestone.owl.domain.Issue;
import kr.wisestone.owl.domain.enumType.IssueStatusType;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
 
import java.util.List;
 
public interface IssueRepository extends JpaRepository<Issue, Long> {
    List<Issue> findByParentIssueId(@Param("parentIssueId") Long parentIssueId);
 
    Page<Issue> findByParentIssueId(@Param("parentIssueId") Long parentIssueId, Pageable pageable);
 
    @Query(value = "select i from Issue i where i.parentIssue.id = :parentIssueId and i.issueStatus.issueStatusType <> :issueStatusType")
    Page<Issue> findByParentIssueId(@Param("parentIssueId") Long parentIssueId,@Param("issueStatusType")  IssueStatusType issueStatusType, Pageable pageable);
}