order by 后面必须用$
<select id="selectItemFront" resultMap="BaseResultMap">
SELECT * FROM tb_item WHERE status = 1
<if test="priceGt != null and priceGt >= 0 and priceLte != null and priceLte >= 0">
AND price BETWEEN #{priceGt} AND #{priceLte}
</if>
<if test="cid != null">
AND cid = #{cid}
</if>
ORDER BY ${orderCol} ${orderDir}
</select>