기존 예제 파일의 search부분은 oracle 문법으로 되어있어서 text 검색 방식으로 수정했다.
error: The content of elements must consist of well-formed character data or markup.
<select id="selectBtList" parameterType="searchVO" resultType="egovMap">
SELECT
BT_ID, LOCATION, AUTHOR_ID, TRAVELER_ID, TRIP_START_DATE, TRIP_END_DATE
FROM TBBUSINESSTRIP
WHERE 1=1
<if test="searchKeyword != null and searchKeyword != ''">
<choose>
<when test="searchCondition == 0">
AND TRAVELER_ID LIKE CONCAT('%', #{searchKeyword},'%')
</when>
<when test="searchCondition == 1">
<![CDATA[
AND TRIP_START_DATE < CONCAT(#{searchKeyword}) AND TRIP_END_DATE > CONCAT(#{searchKeyword})
]]>
</when>
</choose>
</if>
ORDER BY CREATED_AT DESC
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
</select>
// 날짜 검색 입력 기능 jquery
$(document).ready(function () {
// 날짜검색 선택 시
$("#searchCondition").change(function() {
if($("#searchCondition option:selected").val()==1) {
$("#searchKeyword").prop("type", "date");
$("#searchKeyword").datepicker({
changeMonth: true,
changeYear: true,
nextText: '다음 달',
prevText: '이전 달',
dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
dateFormat: "yy-mm-dd",
});
} else {
$("#searchKeyword").prop("type", "text");
$("#searchKeyword").datepicker('option', 'disabled', true);
}
})
});