<sql id="searchOrder">
<if test="sort != null and sort != '' and order != null and order != ''">
order by ${sort} ${order}
</if>
</sql> --定义sql代码块
<include refid="searchOrder"/> --引用sql代码块
mybatis动态sql
最新推荐文章于 2023-12-18 02:17:07 发布