From 916a3cbabe4e50062fce61ff6f2f5d46c05dfbd1 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 목, 17 3월 2022 17:47:45 +0900 Subject: [PATCH] - api로 이슈 추가 시 url/ip로 업체 찾는 코드 수정 --- 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