From 06e47101db331df85b8b35d22a926d2ce82d4ba9 Mon Sep 17 00:00:00 2001
From: wyu <kknd09321@nate.com>
Date: 수, 22 12월 2021 09:27:17 +0900
Subject: [PATCH] 프로젝트 내에 이슈유형 없을시 사이드바에 표시

---
 src/main/resources/mybatis/query-template/project-template.xml |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mybatis/query-template/project-template.xml b/src/main/resources/mybatis/query-template/project-template.xml
index e2d6b13..ed1a5fd 100644
--- a/src/main/resources/mybatis/query-template/project-template.xml
+++ b/src/main/resources/mybatis/query-template/project-template.xml
@@ -82,12 +82,15 @@
             AND p.name like CONCAT('%',#{name},'%')
         </if>
         <choose>
-            <when test="myDepartmentIds.size != 0">
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
                 AND prd.department_id IN
                 <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
         </choose>
 
         <choose>
@@ -184,12 +187,15 @@
         </if>
 
         <choose>
-            <when test="myDepartmentIds.size != 0">
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
                 AND prd.department_id IN
                 <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
         </choose>
 
         <choose>
@@ -480,6 +486,17 @@
             AND p.name like CONCAT('%',#{name},'%')
         </if>
         <choose>
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
+                AND prd.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        <choose>
             <when test="statuses.size != 0">
                 AND p.status IN
                 <foreach collection="statuses" item="item" index="index" separator="," open="(" close=")">

--
Gitblit v1.8.0