A表, B表, AB关系表左连接关系查询
2023-02-09 本文已影响0人
私人云笔记_骁勇波波
public interface DeviceMapper extends BaseMapper<Device> {
@Select("select c.*, d.patient_hcp_id from (SELECT a.model, b.patient_id from sys_device as a LEFT JOIN sys_patient_device as b on a.create_id=#{createId} AND a.sn=b.sn) as c left JOIN sys_patient as d ON c.patient_id=d.id")
Page<ExtDevice> getPageDevicePatientVo(Integer createId, Page<ExtDevice> iPage);
}