From 528658799b844839502e824bbf540c6827588427 Mon Sep 17 00:00:00 2001
From: houruijun <411269194@kidgrow.com>
Date: Tue, 20 Oct 2020 19:17:05 +0800
Subject: [PATCH] 增加到期套餐查询功能

---
 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