Browse Source

媒体素材审核 搜索修改

jiapeng.dong 9 years ago
parent
commit
a2e21f4dde

+ 4 - 4
src/main/java/com/cloudcross/ssp/model/mapper/audit-banner.sql.xml

@@ -237,8 +237,8 @@
 			      b.width <= #{zone.width} and b.height <= #{zone.height}
 			</foreach>
 		</if>
-		<if test="searchKey!=null and searchValue!=null">
-			and b.name like #{searchValue}
+		<if test="value!=null">
+			and b.name like #{value}
 		</if>
 		<if test="operatorChecked!=null">
 		<choose>
@@ -272,8 +272,8 @@
 			      b.width &lt;= #{zone.width} and b.height &lt;= #{zone.height}
 			</foreach>
 		</if>
-	   	<if test="searchKey!=null and searchValue!=null">
-			and b.name like #{searchValue}
+	   	<if test="value!=null">
+			and b.name like #{value}
 		</if>
 		<if test="operatorChecked!=null">
 		<choose>

+ 4 - 2
src/main/java/com/cloudcross/ssp/service/impl/BannerService.java

@@ -319,9 +319,11 @@ public class BannerService implements IBannerService {
 			return 0;
 		}
 		
-		if(paramMap.get("searchValue")!=null){
-			paramMap.put("searchValue", "%" + paramMap.get("searchValue") + "%");
+		if((String)paramMap.get("searchValue") == null||(String)paramMap.get("searchValue")==""){
+			paramMap.put("searchValue", null);	
 		}
+		String value = SqlHelper.doLike(paramMap.get("searchValue"));
+		paramMap.put("value", value);
 		if(paramMap.get("operatorChecked")!=null){
 			paramMap.put("operatorChecked", paramMap.get("operatorChecked"));
 		}