Mapper :
List getInvoiceCompanyForPay(
@Param("idList") List idList,
@Param("isPaying") Integer isPaying,
@Param("payPlanDate") String payPlanDate);
XML:
<if test="idList != null and idList.size()>0">
AND id IN
<foreach collection="idList" item="id" separator="," open="(" close=")">
#{id, jdbcType=INTEGER}
</foreach>
</if>
这里尤其需要注意 and ,必须为小写,大写的话是会报错
org.apache.ibatis.ognl.ParseException: Encountered " <IDENT> "AND ""
网友评论