From c3b8248962bd9b78a8207d5d275395a886d2ee5a Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 수, 15 12월 2021 10:31:02 +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 | 10 ++++++++-- 1 files changed, 8 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..388e063 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> -- Gitblit v1.8.0