<?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.jeecg.modules.basedata.mapper.FdHospitalMapper">

    <select id="findByPage" resultType="org.jeecg.modules.basedata.entity.FdHospital">
        SELECT
            fh.id ,
            fh.code,
            fh.name as name,
            fh.enable as enable,
            fhc.contact_psn  as defaultContactPsn,
            fhc.contact_tel as "defaultContactTel"
        FROM
            fd_hospital fh
            LEFT JOIN fd_hospital_contacts fhc ON fh.id = fhc.pk_hospital_id
            ${ew.customSqlSegment}
    </select>

</mapper>