yxh
昨天 fce96ef468291fb9a0e6a4d34ab371315e9485d4
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
@@ -52,5 +52,18 @@
    @Select("select * from lihu.appointment where apply_no = #{applyNo} limit 1")
    AppointmentDO getByApplyNo(@Param("applyNo") String applyNo);
    /**
     * 【需求1】按申请号批量查询,供列表页一次性回填患者信息,避免 N+1 查询。
     *
     * @param applyNoList 申请号列表(调用方需保证非空,MySQL 的 IN () 会语法错误)
     */
    @Select("<script>" +
            "select * from lihu.appointment where deleted = 0 and apply_no in (" +
            " <foreach collection='applyNoList' separator=',' item='_applyNo'>" +
            "   #{_applyNo} " +
            " </foreach> )" +
            "</script>")
    List<AppointmentDO> getByApplyNoList(@Param("applyNoList") List<String> applyNoList);
}