From 49223e9b20035448078e8d5033e7e22748313f5e Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 금, 10 12월 2021 16:09:10 +0900 Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa --- src/main/resources/mybatis/query-template/widget-template.xml | 65 +++++++++++++++++++++++++++++++- 1 files changed, 63 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mybatis/query-template/widget-template.xml b/src/main/resources/mybatis/query-template/widget-template.xml index 22cd788..4b94ec0 100644 --- a/src/main/resources/mybatis/query-template/widget-template.xml +++ b/src/main/resources/mybatis/query-template/widget-template.xml @@ -47,6 +47,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -90,6 +93,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> AND i.complete_date IS NOT NULL AND i.complete_date <![CDATA[ < ]]> #{completeDate} @@ -217,6 +223,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> AND i.register_date BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY) </select> @@ -325,6 +334,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -539,12 +551,15 @@ INNER JOIN user_department ud ON ud.department_id = isd.department_id where isd.issue_id = i.id <choose> - <when test="myDepartmentIds.size != 0"> + <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> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and isd.register_date BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY)) @@ -603,6 +618,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> And iss.issue_status_type != 'CLOSE' </select> @@ -699,12 +717,15 @@ </when> </choose> <choose> - <when test="myDepartmentIds.size != 0"> + <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> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and iss.issue_status_type != 'CLOSE' GROUP by i.id @@ -1030,6 +1051,17 @@ </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> + <otherwise> + AND 1 != 1 + </otherwise> + </choose> group by p.id </select> @@ -1136,6 +1168,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and p.status = '02'; </select> @@ -1213,6 +1248,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and iss.issue_status_type = 'CLOSE' <choose> @@ -1258,6 +1296,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <choose> <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> @@ -1289,6 +1330,17 @@ INNER JOIN issue_department isd ON isd.issue_id = issue.id INNER JOIN user_department ud ON ud.department_id = isd.department_id WHERE issue.project_id = #{projectId} + <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> + <otherwise> + AND 1 != 1 + </otherwise> + </choose> GROUP BY issue_type.name </select> @@ -1350,6 +1402,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -1426,6 +1481,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <if test="page != null and !page.equals('')"> limit #{pageSize} offset #{page}; @@ -1481,6 +1539,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> -- Gitblit v1.8.0