From 56ae1cd12a7a3a92563bcbf5583f659c5ad5eee5 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 목, 27 1월 2022 15:42:59 +0900 Subject: [PATCH] - 상위 이슈 검색시 하위 이슈는 검색 제외 및 프로젝트 설정 해야 상위이슈 선택 가능하도록 수정 --- src/main/resources/mybatis/query-template/issueType-template.xml | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mybatis/query-template/issueType-template.xml b/src/main/resources/mybatis/query-template/issueType-template.xml index d10b62e..38bf993 100644 --- a/src/main/resources/mybatis/query-template/issueType-template.xml +++ b/src/main/resources/mybatis/query-template/issueType-template.xml @@ -17,14 +17,30 @@ <if test="name != '' and name != null"> AND it.name like CONCAT('%',#{name},'%') </if> + <choose> + <when test="allProjectIds != null and allProjectIds.size != 0"> + AND it.project_id IN + <foreach collection="allProjectIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> <if test="projectId != '' and projectId != null"> AND it.project_id like CONCAT('%',#{projectId},'%') </if> + <choose> + <when test="downProjectIds != null and downProjectIds.size != 0"> + OR it.project_id IN + <foreach collection="downProjectIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> <if test="useProject != '' and useProject != null and useProject == true"> AND it.project_id IS NOT NULL </if> AND ws.id = #{workspaceId} - ORDER BY it.id DESC + ORDER BY it.register_date DESC <if test="page != null and !page.equals('')"> limit #{pageSize} offset #{page}; </if> -- Gitblit v1.8.0