---------------------以数组作为查询条件,判断数组大小
<if test="dateList != null and dateList.size() > 0">
and DATE_FORMAT(tfp.update_time, '%Y-%m-%d') in
<foreach item="date" index="index" collection="dateList" open="(" separator="," close=")">
#{date}
</foreach>
</if>
------------------------mybatis字符串比较方法
<if test='deviceStatus != null and deviceStatus != "" and deviceStatus == "0" '>
and (vdm.`status` is null or vdm.`status` = '')
</if>
注意单引号和双引号的用法
<if test='deviceStatus != null and deviceStatus != "" and deviceStatus == "0" '>
and (vdm.`status` is null or vdm.`status` = '')
</if>
注意单引号和双引号的用法
-------------------------------参数数组判断空
<if test="deviceIds != null and deviceIds.size() > 0">
and t.DEVICE_ID in
<foreach item="deviceId" index="index" collection="deviceIds"
open="(" separator="," close=")">
#{deviceId}
</foreach>
</if>
mybatis存储过程类型定义如下:
http://blog.csdn.net/woshixuye/article/details/12953803
===Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for integralSQL.hashmap
原因: <select id="selectProductExchangeOrder" resultMap="hashmap" parameterType="hashmap" >
应该为 <select id="selectProductExchangeOrder" resultType="hashmap" parameterType="hashmap" >