<?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="org.springblade.modules.baseinfo.org.mapper.DeptRegionMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="baseinfoOrgResultMap" type="org.springblade.modules.baseinfo.org.entity.DeptRegionEntity">
        <result column="dept_id" property="deptId"/>
        <result column="adcd" property="adcd"/>
    </resultMap>

    <select id="getByDeptId" resultMap="baseinfoOrgResultMap">
        SELECT
        n.*
        FROM
        base_dept_region n
        WHERE
        n.is_deleted = 0 and n.dept_id = #{deptId}
        limit 1
    </select>
</mapper>
