很长时间没有使用ibatis,刚上手易激动写了一个in语句,结果调试了半天没搞定
究其原因原来是
<select id="ItemDao.queryItemByIds" resultMap="itemResult"> select * from t_item where id in <isNotNull property="id"> <iterate property="id" conjunction="," open="(" close=")"> #idlist[]# </iterate> </isNotNull> order by create_date DESC limit #pageSize# offset #startRow# </select>
在这个里边property其实并非上面配置的对象的property,而是你传进来的para对象的名称