This commit is contained in:
hezi66677 2024-12-19 23:52:46 +08:00
parent 4ae82ccf78
commit 8753583e94
2 changed files with 20 additions and 2 deletions

View File

@ -38,7 +38,17 @@ public class Mydoctor extends BaseEntity
@Excel(name = "科室id") @Excel(name = "科室id")
private Long administrativeofficeid; private Long administrativeofficeid;
public void setId(Long id) private Myadministrativeoffice myadministrativeoffice;
public Myadministrativeoffice getMyadministrativeoffice() {
return myadministrativeoffice;
}
public void setMyadministrativeoffice(Myadministrativeoffice myadministrativeoffice) {
this.myadministrativeoffice = myadministrativeoffice;
}
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
@ -104,4 +114,6 @@ public class Mydoctor extends BaseEntity
.append("administrativeofficeid", getAdministrativeofficeid()) .append("administrativeofficeid", getAdministrativeofficeid())
.toString(); .toString();
} }
} }

View File

@ -11,10 +11,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="job" column="job" /> <result property="job" column="job" />
<result property="intro" column="intro" /> <result property="intro" column="intro" />
<result property="administrativeofficeid" column="administrativeofficeid" /> <result property="administrativeofficeid" column="administrativeofficeid" />
<association property="myadministrativeoffice" javaType="Myadministrativeoffice" column="administrativeofficeid">
<result property="administrativeoffice" column="administrativeoffice" />
</association>
</resultMap> </resultMap>
<sql id="selectMydoctorVo"> <sql id="selectMydoctorVo">
select id, medicname, administrativeoffice, job, intro, administrativeofficeid from mydoctor SELECT mydoctor.id,mydoctor.medicname,mydoctor.job,mydoctor.intro,myadministrativeoffice.administrativeoffice
from mydoctor
LEFT JOIN myadministrativeoffice
ON mydoctor.administrativeofficeid=myadministrativeoffice.id
</sql> </sql>
<select id="selectMydoctorList" parameterType="Mydoctor" resultMap="MydoctorResult"> <select id="selectMydoctorList" parameterType="Mydoctor" resultMap="MydoctorResult">