| | |
| | | |
| | | @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); |
| | | } |
| | | |