<select id="XXX" resultMap="XXX">
SELECT * FROM tb_shop s
WHERE
<if test=" != null">
xxxxxx
</if>
ORDER BY price DESC LIMIT 10, 5;
</select>
<WHERE>和<IF>标签使用可能会出现的问题
Stack Overflow类似问题
java - When use both WHERE IF DESC and LIMIT by Mybatis, IDEA shows Unable to resolve table 'LIMIT' - Stack Overflowhttps:///questions/60575770/