columnName老師沒有用上,而且老師的輸出字段名字不對老師輸出的是select * from user where 1=1 and userName='hls' and age=19這個userName不應(yīng)該是數(shù)據(jù)庫的名字user_name嗎?userName類的名字
select * from user where 1=1 and userName='hls' and age=19
應(yīng)該是這個吧
select * from user where 1=1 and user_name='hls' and age=19
2018-07-05
把sb.append(" and '").append(fieldName);? 改成sb.append(" and '").append(columnName);
即可,老師這里可能是不小心寫錯了,畢竟他寫的屬性名和注解上的value是一樣的