OWL ITS + 탐지시스템(인터넷 진흥원)
src/main/resources/mybatis/query-template/issue-template.xml
@@ -959,12 +959,20 @@
    <!--    특정 사용자 정의 필드 값이 같은 이슈를 조회 -->
    <select id="findByCustomFieldValue" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.IssueCustomFieldValueCondition">
        SELECT
        issue_custom.issue_id as id
        issue_custom.issue_id as id,
        iss.parent_issue_id as parentIssueId
        FROM issue_custom_field_value issue_custom
        INNER JOIN issue iss ON iss.id = issue_custom.issue_id
        WHERE 1=1
        AND iss.parent_issue_id IS NULL
        AND issue_custom.use_value = #{useValue}
        <choose>
          <when test="useParentIssueId.equals(true)">
              AND iss.parent_issue_id IS NULL
          </when>
          <otherwise>
              AND iss.parent_issue_id IS NOT NULL
          </otherwise>
        </choose>
    </select>
</mapper>