From 3f45ec1851bf75f10b1cacf9d5ead89f875d3217 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 목, 16 12월 2021 14:03:50 +0900 Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa --- 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