From cd56d401c5233f24790a5be8ba4075a97ab80fe3 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 화, 28 12월 2021 19:20:08 +0900 Subject: [PATCH] 상위 프로젝트는 추가 못하도록 수정 --- src/main/resources/mybatis/query-template/widget-template.xml | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mybatis/query-template/widget-template.xml b/src/main/resources/mybatis/query-template/widget-template.xml index 26e1ace..1f57277 100644 --- a/src/main/resources/mybatis/query-template/widget-template.xml +++ b/src/main/resources/mybatis/query-template/widget-template.xml @@ -953,12 +953,21 @@ <if test="page != null and !page.equals('')"> INNER JOIN issue_status iss ON iss.id = i.issue_status_id INNER JOIN project p ON p.id = i.project_id + LEFT OUTER join issue_department isd on isd.issue_id = i.id </if> WHERE 1=1 <choose> <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> + <choose> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> + AND isd.department_id IN + <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -977,6 +986,7 @@ SELECT COUNT(DISTINCT i.id) FROM issue i INNER JOIN project p ON p.id = i.project_id + LEFT OUTER join issue_department isd on isd.issue_id = i.id <if test="page != null and !page.equals('')"> INNER JOIN issue_status iss ON iss.id = i.issue_status_id </if> @@ -989,6 +999,14 @@ </foreach> </when> </choose> + <choose> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> + AND isd.department_id IN + <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> AND i.complete_date IS NOT NULL AND i.complete_date <![CDATA[ < ]]> #{completeDate} <if test="page != null and !page.equals('')"> -- Gitblit v1.8.0