동적 검색 관련 유틸리티 추가
parent
278af34db7
commit
115b5daf01
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="dynamicSearch">
|
||||||
|
|
||||||
|
<sql id="start">
|
||||||
|
<if test="mainOption == 'codeValue'"> AND FN_GET_CODE_NM(#{subOption},</if>
|
||||||
|
<if test="mainOption == 'match'"> AND </if>
|
||||||
|
<if test="mainOption == 'ymd'"> AND SUBSTR(</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="center">
|
||||||
|
<if test="mainOption == 'codeValue'">) LIKE CONCAT('%',</if>
|
||||||
|
<if test="mainOption == 'match'">
|
||||||
|
<if test="subOption == 'perfect'"> = </if>
|
||||||
|
<if test="subOption == 'part'"> LIKE CONCAT('%',</if>
|
||||||
|
</if>
|
||||||
|
<if test="mainOption == 'ymd'">,1,8) = REPLACE(</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="end">
|
||||||
|
<if test="mainOption == 'codeValue'">, '%')</if>
|
||||||
|
<if test="mainOption == 'match'">
|
||||||
|
<if test="subOption == 'perfect'"></if>
|
||||||
|
<if test="subOption == 'part'">, '%')</if>
|
||||||
|
</if>
|
||||||
|
<if test="mainOption == 'ymd'">,'-','')</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue