When querying mybatis, you need to use operators less than <
and greater than >
. In the mybatis configuration file, this is considered as a label, so the parsing error
<if test="params.perCapita != null and params.perCapita !=''">
and perCapita <= #{params.perCapita}
</if>
Should be changed to:
<if test="params.perCapita != null and params.perCapita !=''">
<![CDATA[ and perCapita <= #{params.perCapita} ]]>
</if>