<if test="command != null and !''.equals(command.trim())">
2018-10-06
oracle:
<if test="description != null and !&quot;&quot;.equals(description.trim())">
and DESCRIPTION like '%'||#{description}||'%' </if>
<if test="description != null and !&quot;&quot;.equals(description.trim())">
and DESCRIPTION like '%'||#{description}||'%' </if>
2018-09-25
最新回答 / CrzayCode
2018-09-23 15:26:53,556 [http-nio-8080-exec-6] DEBUG [Message.queryMessageList] - ==>? Preparing: select ID,COMMAND,DESCRIPTION,CONTENT from MESSAGE where 1=1 WHERE COMMAND=發(fā)送 :你的sql寫錯了 where只能跟一個
2018-09-23
到第四章4-7這一小節(jié)速度突然加快了許多,速度沒跟上來,只能下載老師的源碼復(fù)制粘貼了。。。
2018-09-23
老師牛逼 ,講的很有意思,一點(diǎn)也不枯燥無味,哈哈,也愛看您的課程!
2018-09-22
是maven的項(xiàng)目, 參考老師的課程狗尾續(xù)貂做了增刪查改還有批量刪除, 用的是layer彈出層, 有比較好的體驗(yàn)
鏈接:https://pan.baidu.com/s/12N09ws0t1pJmaQYZ11iltg 密碼:pxiq
如果有同學(xué)看到就看到, 看不到就算了
鏈接:https://pan.baidu.com/s/12N09ws0t1pJmaQYZ11iltg 密碼:pxiq
如果有同學(xué)看到就看到, 看不到就算了
2018-09-12
最贊回答 / shaohuayishi
if(description!=null&&!"".equals(description)){ sql.append(" and DESCRIPTION like concat('%',?,'%')"); args.add(description); }
2018-09-08
最贊回答 / 漫步fy
1、這個是sql拼接, 如果if語句中條件滿足了,就會和之前的sql拼接,舉個例子:select * from user where id=1,如果條件滿足不加空格的話就會變成“select * from user where id=1and command=?”,很明顯and和1連在一起了,是錯誤的2、?是指帶你要輸入的數(shù)據(jù),這個是數(shù)據(jù)庫PreparedStatement預(yù)處理的操作,%?%舉個例子:比如模糊查詢想查userName, 那這個?代表你前臺傳過來的userName, 數(shù)據(jù)庫里有123,11...
2018-09-05