Просмотр исходного кода

getReviewList 쿼리문에 searchTxt 조건 추가

gagamel 5 лет назад
Родитель
Сommit
0671350350
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml

+ 5 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsaReview.xml

@@ -68,11 +68,13 @@
 		<if test="dispYn != null and dispYn != ''">
 		AND    R.DISP_YN = #{dispYn}
 		</if>
-		<if test="searchGb == 'memNm'">
+		<if test="searchTxt != null and searchTxt != ''">
+		    <if test="searchGb == 'memNm'">
 		AND    UPPER(C.CUST_NM) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
-		</if>
-		<if test="searchGb == 'email'">
+		    </if>
+		    <if test="searchGb == 'email'">
 		AND    UPPER(C.EMAIL) LIKE CONCAT('%',UPPER(#{searchTxt}),'%')
+		    </if>
 		</if>
 		ORDER  BY R.REG_DT DESC
 	</select>