### SQL: select * from customer WHERE limit ?,? ### Cause: com.mysql.jdbc.ex
改正前、
<select id="querycustomerinfo" parameterType="QueryVo" resultType="Customer">
select * from customer
<where>
<if test="custName!=null and custName!=''">
and cust_name link "%" #{custName} "%"
</if>
<if test="custSource!=null and custSource!=''">
and cust_source=#{custSource}
</if>
<if test="custIndustry!=null and custIndustry!=''">
and cust_industry=#{custIndustry}
</if>
<if test="custLevel!=null and custLevel!=''">
and cust_level=#{custLevel}
</if>
limit #{start},#{rows}
</where>
</select>
改正后
<select id="querycustomerinfo" parameterType="QueryVo" resultType="Customer">
select * from customer
<where>
<if test="custName!=null and custName!=''">
and cust_name link "%" #{custName} "%"
</if>
<if test="custSource!=null and custSource!=''">
and cust_source=#{custSource}
</if>
<if test="custIndustry!=null and custIndustry!=''">
and cust_industry=#{custIndustry}
</if>
<if test="custLevel!=null and custLevel!=''">
and cust_level=#{custLevel}
</if>
</where>
limit #{start},#{rows}
</select>
错误在于 limit #{start},#{rows}放在<where>便签里select * from customer WHERE limit ?,?