<?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.FdHospitalContactsMapper">

    <select id="findByPage" resultType="org.jeecg.modules.basedata.entity.FdHospitalContacts">
       SELECT
            fhc.id,
            fhc.contact_psn AS contactPsn,
            fhc.address,
            fhc.contact_tel AS contectTel,
            fhc.email,
            fhc.is_default AS isDefault,
            fhc.memo,
            fhc.pk_hospital_id as pkHosptalId
        FROM
            fd_hospital_contacts fhc
        LEFT JOIN fd_hospital fh ON fhc.pk_hospital_id = fh.id
            ${ew.customSqlSegment}
    </select>
    <select id="getByHospitalId" resultType="org.jeecg.modules.basedata.entity.FdHospitalContacts">
        select * from fd_hospital_contacts where pk_hospital_id = #{pkHospitalId}
    </select>

</mapper>