Mybatis writes SQL comparison operator <= in XML and reports an error solution

Problem Description

Insert picture description here

solve

  <select id="selectStockWarning" resultType="java.lang.Integer">
   select COUNT(id)
   from mall_stock
   where deleted = 0 and <![CDATA[`number` <= `warning`]]>
  </select>

Put the expression in <![CDATA[expression]]>

Guess you like

Origin blog.csdn.net/qq_47768542/article/details/113772538