liujie
2026-05-21 34fb8efd9fef8a6ed0d7cbaff74f37f06bf2db60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
}