mybatis使用order by注意时间:2023-03-09 08:15:03 直接用动态参数生成,不会排序: <if test="orderColumn!=null and orderColumn != ''"> ORDER BY #{orderColumn} #{orderDir} </if> 需要将#改为$: <if test="orderColumn!=null and orderColumn != ''">ORDER BY ${orderColumn} ${orderDir}</if>