czt
2025-06-11 283da741b2429cf5a53786e5ee1b5528b757fdf6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.fzzy.igds.sys.repository;
 
import com.fzzy.igds.dzhwk.domain.DicArea;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 09:56
 */
@Service
public interface DicAreaRepository extends JpaRepository<DicArea, String>, JpaSpecificationExecutor<DicArea> {
 
    /**
     * 根据父编码查询区域信息
     *
     * @param parentCode
     * @return
     */
    @Query("from DicArea where parentCode =:parentCode order by code")
    List<DicArea> getDicAreaByParentCode(@Param("parentCode") String parentCode);
 
    /**
     * 根据名称获取区域信息
     *
     * @param name
     * @return
     */
    @Query("from DicArea where name =:name order by code")
    DicArea listDicAreaByName(@Param("name") String name);
 
    /**
     * 根据code获取区域信息
     *
     * @param code
     * @return
     */
    @Query("from DicArea where code =:code order by code")
    DicArea listDicAreaByCode(@Param("code") String code);
 
}