这个时候需要用$来接,直接上代码:
<if test="query.current != null and query.size!=null ">
LIMIT ${(query.current - 1) * query.size},#{query.size}
</if>
文章展示了一段在编程中使用iftest条件判断来构造SQLLIMIT子句的代码示例,主要涉及查询当前页和每页大小的逻辑处理。
这个时候需要用$来接,直接上代码:
<if test="query.current != null and query.size!=null ">
LIMIT ${(query.current - 1) * query.size},#{query.size}
</if>

被折叠的 条评论
为什么被折叠?