|
|
@@ -34,13 +34,33 @@
|
|
|
<if test="dispYn != null and dispYn != ''">
|
|
|
AND R.DISP_YN = #{dispYn}
|
|
|
</if>
|
|
|
- <if test="searchTxt != null and searchTxt != ''">
|
|
|
- <if test="searchGb == 'memNm'">
|
|
|
- AND UPPER(C.CUST_NM) LIKE CONCAT(UPPER(#{searchTxt}),'%')
|
|
|
- </if>
|
|
|
- <if test="searchGb == 'email'">
|
|
|
- AND UPPER(C.EMAIL) LIKE CONCAT(UPPER(#{searchTxt}),'%')
|
|
|
- </if>
|
|
|
+ <if test="searchGb != null and searchGb != '' and searchTxtArr != null">
|
|
|
+ <choose>
|
|
|
+ <when test="searchGb != null and searchGb == 'custNo'">
|
|
|
+ AND C.CUST_NO IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'custId'">
|
|
|
+ AND
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="OR" close=")">
|
|
|
+ UPPER(C.CUST_ID) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'custNm'">
|
|
|
+ AND C.CUST_NM IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'email'">
|
|
|
+ AND C.EMAIL IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -128,13 +148,33 @@
|
|
|
<if test="dispYn != null and dispYn != ''">
|
|
|
AND R.DISP_YN = #{dispYn}
|
|
|
</if>
|
|
|
- <if test="searchTxt != null and searchTxt != ''">
|
|
|
- <if test="searchGb == 'memNm'">
|
|
|
- AND UPPER(C.CUST_NM) LIKE CONCAT(UPPER(#{searchTxt}),'%')
|
|
|
- </if>
|
|
|
- <if test="searchGb == 'email'">
|
|
|
- AND UPPER(C.EMAIL) LIKE CONCAT(UPPER(#{searchTxt}),'%')
|
|
|
- </if>
|
|
|
+ <if test="searchGb != null and searchGb != '' and searchTxtArr != null">
|
|
|
+ <choose>
|
|
|
+ <when test="searchGb != null and searchGb == 'custNo'">
|
|
|
+ AND C.CUST_NO IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'custId'">
|
|
|
+ AND
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="OR" close=")">
|
|
|
+ UPPER(C.CUST_ID) LIKE CONCAT('%',UPPER(#{item}),'%')
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'custNm'">
|
|
|
+ AND C.CUST_NM IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <when test="searchGb != null and searchGb == 'email'">
|
|
|
+ AND C.EMAIL IN
|
|
|
+ <foreach collection="searchTxtArr" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
ORDER BY R.REG_DT DESC
|
|
|
LIMIT #{pageable.limitStartRow}, #{pageable.pageSize}
|