<?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.xueyi.system.digitalmans.mapper.DmDigitalmanMapper">

    <resultMap id="digitalmanMapper" type="com.xueyi.system.digitalmans.domain.dto.DmDigitalmanDto">
        <association property="extDto" column="man_id" select="selectExt"/>
    </resultMap>
    <select id="selectByCode" resultMap="digitalmanMapper">
        select * from dm_man dm where man_code = #{code}
    </select>

    <select id="selectExt" resultType="DmDigitalmanExtPo">
        select * from dm_man_ext where id = #{man_id}
    </select>
</mapper>