<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.ibs.grid.mapper.RegionAdminDivisionRelateMapper">
    <select id="selectCodeByDept" resultType="String">
        select distinct code from grid_region_admin_division_relate a
        left join grid_region_grid b on a.grid_id = b.grid_id
        where b.delete_flag = '0' and a.delete_flag = '0' and b.grid_level = 1 and b.dept_id like concat(#{deptCode}, '%')
    </select>

</mapper>