|
@@ -1,5 +1,6 @@
|
|
package com.museum.dao.Provide;
|
|
package com.museum.dao.Provide;
|
|
|
|
|
|
|
|
+import com.museum.common.util.RegexUtils;
|
|
import com.museum.domain.request.NavRequest;
|
|
import com.museum.domain.request.NavRequest;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -18,6 +19,7 @@ public class PartProvider {
|
|
|
|
|
|
String searchKey = param.getSearchKey();
|
|
String searchKey = param.getSearchKey();
|
|
if(StringUtils.isNotBlank(searchKey)){
|
|
if(StringUtils.isNotBlank(searchKey)){
|
|
|
|
+ searchKey = RegexUtils.sqlValid(searchKey);
|
|
// 字符串要加'
|
|
// 字符串要加'
|
|
sql.append(" and name like '%").append(searchKey).append("%'");
|
|
sql.append(" and name like '%").append(searchKey).append("%'");
|
|
}
|
|
}
|
|
@@ -59,6 +61,7 @@ public class PartProvider {
|
|
|
|
|
|
String searchKey = param.getSearchKey();
|
|
String searchKey = param.getSearchKey();
|
|
if(StringUtils.isNotBlank(searchKey)){
|
|
if(StringUtils.isNotBlank(searchKey)){
|
|
|
|
+ searchKey = RegexUtils.sqlValid(searchKey);
|
|
// 字符串要加'
|
|
// 字符串要加'
|
|
sql.append(" and z.name like '%").append(searchKey).append("%'");
|
|
sql.append(" and z.name like '%").append(searchKey).append("%'");
|
|
}
|
|
}
|