From 004e1229ed36a98cc3bb9e3c0eb15be2ab8c0642 Mon Sep 17 00:00:00 2001
From: 克 刘 <4345453@qq.com>
Date: Thu, 16 Apr 2020 11:16:49 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.2.240:7070/r/kidgrow-microservices-platform into dev

---
 kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
index 0026ee8..3a9f902 100644
--- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
+++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysHospitalMapper.xml
@@ -129,4 +129,59 @@
         <include refid="where"/>
         order by id desc
     </select>
+    <sql id="whereList">
+        <where>
+            DEP.is_del = 0
+            AND HOS.is_del = 0
+            <if test="p.isScreen != null and p.isScreen !=''">
+                and is_screen = #{p.isScreen}
+            </if>
+            <if test="p.isAnswer != null and p.isAnswer !=''">
+                and is_answer = #{p.isAnswer}
+            </if>
+            <if test="p.hospitalState != null and p.hospitalState !=''">
+                and hospital_state = #{p.hospitalState}
+            </if>
+            <if test="p.hospitalProvince != null and p.hospitalProvince !=''">
+                and hospital_province = #{p.hospitalProvince}
+            </if>
+            <if test="p.hospitalCity != null and p.hospitalCity !=''">
+                and hospital_city = #{p.hospitalCity}
+            </if>
+            <if test="p.hospitalArea != null and p.hospitalArea !=''">
+                and hospital_area = #{p.hospitalArea}
+            </if>
+            <if test="p.hospitalName != null and p.hospitalName !=''">
+                and hospital_name LIKE concat('%',#{p.hospitalName},'%')
+            </if>
+        </where>
+    </sql>
+    <select id="findHospitalList" resultType="com.kidgrow.usercenter.vo.HospitalListVo">
+        SELECT
+        DEP.department_name,
+        DEP.id department_id,
+        DEP.server_user_name,
+        DEP.server_user_id,
+        DEP.org_id,
+        DEP.is_del,
+        DEP.enabled,
+        HOS.id hospital_id,
+        HOS.hospital_name,
+        HOS.hospital_code,
+        HOS.hospital_province,
+        HOS.hospital_city,
+        HOS.hospital_area,
+        HOS.hospital_tel,
+        HOS.hospital_state,
+        HOS.hospital_link,
+        HOS.is_screen,
+        HOS.is_answer,
+        HOS.tenant_id,
+        HOS.create_time
+        FROM
+	sys_department DEP
+	LEFT JOIN sys_hospital HOS ON DEP.hospital_id = HOS.id
+        <include refid="whereList"/>
+        order by create_time  desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0