From b7265cdd6f3e1fbb0d428c27e5b5e29e34d56953 Mon Sep 17 00:00:00 2001 From: zhaoxiaohao <279049017@qq.com> Date: Tue, 17 Nov 2020 17:55:21 +0800 Subject: [PATCH] Merge branch 'dev' --- kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DoctorTempleteMapper.xml | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DoctorTempleteMapper.xml b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DoctorTempleteMapper.xml index a0af4f6..dca1e77 100644 --- a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DoctorTempleteMapper.xml +++ b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DoctorTempleteMapper.xml @@ -40,7 +40,7 @@ and templete_type = #{p.templeteType} </if> <if test="p.templeteTitle != null and p.templeteTitle !=''"> - and templete_title = #{p.templeteTitle} + and templete_title like '%${p.templeteTitle}%' </if> <if test="p.templeteNote != null and p.templeteNote !=''"> and templete_note = #{p.templeteNote} @@ -79,6 +79,7 @@ from doctor_templete <include refid="where"/> order by id desc + limit 1 </select> <!--定义根据-DoctorTemplete当作查询条件返回对象集合--> @@ -89,4 +90,37 @@ <include refid="where"/> order by id desc </select> + <select id="findDoctorList" resultType="com.kidgrow.oprationcenter.model.DoctorTemplete"> + SELECT + id, + doctor_id, + doctor_name, + public_type, + templete_type, + templete_title, + templete_note, + create_time +FROM + doctor_templete +WHERE + is_del = 0 + AND enabled = 1 + <if test="p.templeteType!=null and p.templeteType!=''"> + AND templete_type = #{p.templeteType} + </if> + AND(( + hospital_id IS NULL + AND hospital_id IS NULL + AND doctor_id IS NULL + ) + OR ( + hospital_id =#{p.hospitalId} + AND department_id =#{p.departmentId} + AND ( + public_type = 0 + OR ( + doctor_id =#{p.doctorId} AND public_type = 1)))) + ORDER BY public_type DESC,id desc + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0