ZQN
2024-06-17 b1ff19545212508d3f65741ab889f0b6df82a511
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
package com.project.system.mapper;
 
import com.project.system.domain.SysRegion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.system.domain.vo.RegionVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
/**
 * 行政区划Mapper接口
 *
 * @author manton
 * @date 2023-04-13
 */
public interface SysRegionMapper extends BaseMapper<SysRegion> {
 
 
    List<RegionVO> regionTree(@Param("parentCode") String parentCode,
                              @Param("name") String name);
 
    @Select("SELECT  `code` FROM sys_region where parent_code = #{parentId} ORDER BY `code` DESC LIMIT 1")
    String regionCode(@Param("parentId") String parentId);
}