问题:条件查询数据列表,先查询数量,在分页查询数据,传入相同的参数。先执行数量查询将传入参数值更改!
原因:xml文件if条件写错:
<if test="record.employeeattence = null or (record.employeeattence != null and record.employeeattence.organizationid == null)">
group by m.username, t.employeeCode
</if>
其中record.employeeattence = null将参数重新赋值,
正确写法:<if test="record.employeeattence ==null or (record.employeeattence != null and record.employeeattence.organizationid == null)">
group by m.username, t.employeeCode
</if>