2021
08-23
08-23
Java代码里如何拼接SQL语句到mybatis的xml
关键语句:StringBuilderwhereSql=newStringBuilder();whereSql.append("SQL");实现类:publicListgetList(Map<String,Object>map){List<Map<String,Object>>rs=newArrayList<Map<String,Object>>();try{StringBuilderwhereSql=newStringBuilder();if(map.get("userName").toString().length()>0){whereSql.append("ANDa.userNamein('"+map.get("userName").toString().replaceAll(",...
继续阅读 >