package com.estate.expert.admin.domain.standard.measure;
|
|
import com.estate.expert.admin.domain.common.EntityBaseRepository;
|
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.repository.query.Param;
|
|
import java.util.List;
|
|
public interface MeasureRuleRepository extends EntityBaseRepository<MeasureRule> {
|
|
@Query("select p from MeasureRule p where p.hierarchyId = :hierarchyId " +
|
"and p.hierarchyPath in :hierarchyPaths " +
|
"and (:keyword is null or :keyword = '' or p.description like %:keyword% ) " +
|
"and p.deleted = false")
|
Page<MeasureRule> findRules(@Param("hierarchyId") Integer hierarchyId,
|
@Param("hierarchyPaths") List<String> hierarchyPaths,
|
@Param("keyword") String keyword,
|
Pageable pageReq);
|
}
|