LIKE ? ESCAPE’’
/*
* Object 转String
*/
public static String obj2NotNullString(Object obj){
if(obj == null){
return “”;
}
return String.valueOf(obj);
}
/*
* 模糊查询转义
*/
public static String obj2Paraphrase(Object obj){
String paraphraseStr = obj2NotNullString(obj).replace("%", “\%”);
return paraphraseStr;
}
//不区分大小写
if(StringTools.isNotBlankNull(adminName)){
sb.append(" AND UPPER(P.ADMIN_NAME) like ? escape ‘\’ “);
paramList.add(”%"+StringTools.obj2Paraphrase(adminName).toUpperCase()+"%");
}