嘎嘎嘎

main
768863620@qq.com 2025-06-19 17:52:48 +08:00
parent 152772eb00
commit cdd734bd95
2 changed files with 8 additions and 4 deletions

View File

@ -273,7 +273,7 @@ public class QueryAction extends AbstractAction implements ApplicationContextAwa
} }
Map params = tableConfig.getParams(); Map params = tableConfig.getParams();
for (Object key : params.keySet()) { /* for (Object key : params.keySet()) {
Object param=params.get(key); Object param=params.get(key);
String param_str=param.toString(); String param_str=param.toString();
if(param_str.indexOf("%")==0){ if(param_str.indexOf("%")==0){
@ -281,7 +281,7 @@ public class QueryAction extends AbstractAction implements ApplicationContextAwa
log.info("替换------"+key.toString()+"====="+param_str+"--"+param_str.indexOf("%")); log.info("替换------"+key.toString()+"====="+param_str+"--"+param_str.indexOf("%"));
} }
} }*/

View File

@ -224,8 +224,12 @@ return translator.getSQLString();
String dateString = sdf.format(parm); String dateString = sdf.format(parm);
hql=hql.replace("{"+ketstr+"}", dateString); hql=hql.replace("{"+ketstr+"}", dateString);
}else{ }else{
String param_str=parm.toString();
hql=hql.replace("{"+ketstr+"}", parm.toString().replaceAll(" ", "")); param_str=param_str.trim();
if(param_str.indexOf("%")==0){
param_str=param_str.substring(1);
}
hql=hql.replace("{"+ketstr+"}", param_str);
} }
} }