<?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.RegionGridTransferMapper">
    <select id="getGridRegionTransferListByTopGrid" resultType="GridRegionTransfer">
        select a.*
        from grid_region_transfer a
                 left join grid_region_grid b on a.prev_grid_id = b.grid_id
                 left join grid_region_grid c on a.next_grid_id = c.grid_id
        where b.parent_grid_id = #{gridId}
           or c.parent_grid_id = #{gridId}
        order by a.create_time desc
    </select>
</mapper>