|
|
@@ -18,6 +18,8 @@
|
|
|
<result property="clinicStatus" column="clinic_status"/>
|
|
|
<result property="lastModifyUserType" column="last_modify_user_type"/>
|
|
|
<result property="care" column="care"/>
|
|
|
+ <result property="doctorId" column="doctor_id"/>
|
|
|
+ <result property="doctorNickname" column="doctor_nickname"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="stdWxAppletDetailResult" type="cn.tr.module.smart.wx.controller.vo.BizWxAppletClinicDetailVO">
|
|
|
@@ -53,22 +55,26 @@
|
|
|
|
|
|
<select id="stdSelectWxAppletClinicList" resultMap="stdWxAppletResult">
|
|
|
select
|
|
|
- bcr.id as id,
|
|
|
- bcr.patient_name as patient_name,
|
|
|
- bcr.patient_age as patient_age,
|
|
|
- bcr.patient_gender as patient_gender,
|
|
|
- bcr.patient_code as patient_code,
|
|
|
- bcr.clinic_start_time as clinic_start_time,
|
|
|
- bcr.dept_id as dept_id,
|
|
|
- bcr.dept_name as dept_name,
|
|
|
- bcr.clinic_name as clinic_name,
|
|
|
- bcr.image_url as image_url,
|
|
|
- bcr.clinic_status as clinic_status,
|
|
|
- bcr.last_modify_user_type,
|
|
|
- bcrwu.care as care
|
|
|
+ bcr.id as id,
|
|
|
+ bcr.patient_name as patient_name,
|
|
|
+ bcr.patient_age as patient_age,
|
|
|
+ bcr.patient_gender as patient_gender,
|
|
|
+ bcr.patient_code as patient_code,
|
|
|
+ bcr.clinic_start_time as clinic_start_time,
|
|
|
+ bcr.dept_id as dept_id,
|
|
|
+ bcr.dept_name as dept_name,
|
|
|
+ bcr.clinic_name as clinic_name,
|
|
|
+ bcr.image_url as image_url,
|
|
|
+ bcr.clinic_status as clinic_status,
|
|
|
+ bcr.last_modify_user_type,
|
|
|
+ bcrwu.care as care,
|
|
|
+ su.id as doctor_id,
|
|
|
+ su.nickname as doctor_nickname
|
|
|
from
|
|
|
- biz_clinic_room as bcr
|
|
|
- join biz_clinic_room_wx_user as bcrwu on bcrwu.clinic_room_id=bcr.id
|
|
|
+ biz_clinic_room as bcr
|
|
|
+ join biz_clinic_room_wx_user as bcrwu on bcrwu.clinic_room_id=bcr.id
|
|
|
+ left join biz_clinic_room_doctor_user as bcrmu on bcrmu.clinic_room_id=bcr.id
|
|
|
+ left join sys_user as su on bcrmu.user_id=su.id
|
|
|
<where>
|
|
|
and bcr.deleted=0 and bcrwu.wx_user_id = #{query.userId}
|
|
|
<if test="query.patientCode != null and query.patientCode != ''">
|
|
|
@@ -129,27 +135,27 @@
|
|
|
|
|
|
<select id="stdSelectWxAppletById" resultMap="stdWxAppletDetailResult">
|
|
|
select
|
|
|
- bcr.id as id,
|
|
|
- bcr.patient_name as patient_name,
|
|
|
- bcr.patient_age as patient_age,
|
|
|
- bcr.patient_gender as patient_gender,
|
|
|
- bcr.patient_code as patient_code,
|
|
|
- bcr.clinic_start_time as clinic_start_time,
|
|
|
- bcr.dept_id as dept_id,
|
|
|
- bcr.dept_name as dept_name,
|
|
|
- bcr.clinic_name as clinic_name,
|
|
|
- bcr.clinic_status as clinic_status,
|
|
|
- bcrwu.care as care,
|
|
|
- bqa.id as question_answer_id,
|
|
|
- bqa.answer_time as last_modify_question_time,
|
|
|
- su.id as doctor_id,
|
|
|
- su.nickname as doctor_nickname
|
|
|
+ bcr.id as id,
|
|
|
+ bcr.patient_name as patient_name,
|
|
|
+ bcr.patient_age as patient_age,
|
|
|
+ bcr.patient_gender as patient_gender,
|
|
|
+ bcr.patient_code as patient_code,
|
|
|
+ bcr.clinic_start_time as clinic_start_time,
|
|
|
+ bcr.dept_id as dept_id,
|
|
|
+ bcr.dept_name as dept_name,
|
|
|
+ bcr.clinic_name as clinic_name,
|
|
|
+ bcr.clinic_status as clinic_status,
|
|
|
+ bcrwu.care as care,
|
|
|
+ bqa.id as question_answer_id,
|
|
|
+ bqa.answer_time as last_modify_question_time,
|
|
|
+ su.id as doctor_id,
|
|
|
+ su.nickname as doctor_nickname
|
|
|
from
|
|
|
- biz_clinic_room as bcr
|
|
|
- join biz_clinic_room_wx_user as bcrwu on bcrwu.clinic_room_id=bcr.id
|
|
|
- left join biz_clinic_room_doctor_user as bcrmu on bcrmu.clinic_room_id=bcr.id
|
|
|
- left join sys_user as su on bcrmu.user_id=su.id
|
|
|
- left join biz_question_answer as bqa on bqa.clinic_id=bcr.id
|
|
|
+ biz_clinic_room as bcr
|
|
|
+ join biz_clinic_room_wx_user as bcrwu on bcrwu.clinic_room_id=bcr.id
|
|
|
+ left join biz_clinic_room_doctor_user as bcrmu on bcrmu.clinic_room_id=bcr.id
|
|
|
+ left join sys_user as su on bcrmu.user_id=su.id
|
|
|
+ left join biz_question_answer as bqa on bqa.clinic_id=bcr.id
|
|
|
where bcr.id =#{id}
|
|
|
</select>
|
|
|
</mapper>
|