From 8cdee12102d831355c2be8fedff2d7f26cb0931b Mon Sep 17 00:00:00 2001
From: jhjang <jhjang@maprex.co.kr>
Date: 목, 16 12월 2021 19:02:28 +0900
Subject: [PATCH] - 프로젝트내 이슈유형에 설정된 사용자 정의 필드가 없을 경우 오류 예외 처리(api 입력 안되는 원인이었음)

---
 src/main/resources/mybatis/query-template/user-template.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mybatis/query-template/user-template.xml b/src/main/resources/mybatis/query-template/user-template.xml
index d335214..e16010d 100644
--- a/src/main/resources/mybatis/query-template/user-template.xml
+++ b/src/main/resources/mybatis/query-template/user-template.xml
@@ -182,4 +182,20 @@
         WHERE u.level_id = #{id}
     </select>
 
+    <select id="findByMyLevelAndDepartment" resultType="java.util.HashMap" parameterType="java.lang.Long">
+        SELECT
+        DISTINCT u.id as id,
+                 ul.level_name AS levelName,
+                 GROUP_CONCAT(d.department_name) AS departmentName,
+                 u.name as name,
+                 u.account as account,
+                 u.profile as profile,
+                 u.status as STATUS
+        FROM user u
+        LEFT OUTER JOIN user_level ul ON u.level_id = ul.id
+        LEFT OUTER JOIN user_department ud ON ud.user_id = u.id
+        LEFT OUTER JOIN department d ON d.id = ud.department_id
+        WHERE u.id = #{id}
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0