From b9ddafced1c241f7c4a5128a123a6927554fb610 Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 월, 08 11월 2021 18:06:39 +0900
Subject: [PATCH] 업체 관리 백엔드 수정

---
 src/main/resources/mybatis/query-template/departmentManage-template.xml |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mybatis/query-template/departmentManage-template.xml b/src/main/resources/mybatis/query-template/departmentManage-template.xml
index d0d6810..8269244 100644
--- a/src/main/resources/mybatis/query-template/departmentManage-template.xml
+++ b/src/main/resources/mybatis/query-template/departmentManage-template.xml
@@ -8,15 +8,16 @@
         dm.id as id,
         dm.department_name as departmentName,
         dm.department_description as departmentDescription,
+        dm.default_department as defalutDepartment,
         (SELECT COUNT(u.id) FROM user u WHERE dm.id = u.department_id) AS departmentCount
         FROM
         department_manage dm
         WHERE 1=1
         <if test="departmentName != '' and departmentName != null">
-            AND ul.department_name like CONCAT('%',#{departmentName},'%')
+            AND dm.department_name like CONCAT('%',#{departmentName},'%')
         </if>
         <if test="id != '' and id != null">
-            AND ul.id like CONCAT('%',#{id},'%')
+            AND dm.id like CONCAT('%',#{id},'%')
         </if>
         <if test="pageSize != '' and pageSize != null">
             limit #{pageSize} offset #{page};
@@ -30,7 +31,10 @@
         department_manage dm
         WHERE 1=1
         <if test="departmentName != '' and departmentName != null">
-            AND ul.department_name like CONCAT('%',#{departmentName},'%')
+            AND dm.department_name like CONCAT('%',#{departmentName},'%')
+        </if>
+        <if test="id != '' and id != null">
+            AND dm.id like CONCAT('%',#{id},'%')
         </if>
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0