優雅實現模糊搜索
具體代碼:
<bind name="patter" value="'%' + articleTitle + '%'"></bind>
and t2.article_title like #{patter}
mybatis query integer 0 null
mybatis查詢的時候 如果屬性值爲0,且屬性類型爲Integer,那麼service拿到對象值得時候會null,如何處理?
- 屬性類型改成Long類型
IFNULL( t3.help_value, 0 ) AS "helpValue"