From 0a8b731d9cf46c78c0c4c66fa9954eeb262e4017 Mon Sep 17 00:00:00 2001
From: luliqiang <kidgrow>
Date: Mon, 10 Aug 2020 09:20:50 +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/SysDepartmentMapper.xml |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysDepartmentMapper.xml b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysDepartmentMapper.xml
index fbddc1a..181b0a0 100644
--- a/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysDepartmentMapper.xml
+++ b/kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/resources/mapper/SysDepartmentMapper.xml
@@ -15,9 +15,6 @@
             <if test="p.id != null and p.id !=''">
                 and id = #{p.id}
             </if>
-            <if test="p.hospitalId != null and p.hospitalId !=''">
-                and hospital_id = #{p.hospitalId}
-            </if>
             <if test="p.departmentName != null and p.departmentName !=''">
                 and department_name = #{p.departmentName}
             </if>
@@ -54,6 +51,9 @@
             <if test="p.updateTime != null and p.updateTime !=''">
                 and update_time = #{p.updateTime}
             </if>
+            <if test="p.accountsCount != null and p.accountsCount !=''">
+                and accounts_count = #{p.accountsCount}
+            </if>
         </where>
     </sql>
 
@@ -75,4 +75,9 @@
         <include refid="where"/>
         order by id desc
     </select>
+    <select id="checkDepartmentName" resultType="string">
+        SELECT org_name FROM sys_organization
+WHERE org_parent_id =( SELECT org_id FROM sys_hospital WHERE id = #{hosId} )
+AND org_name = #{departmentName}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0