傻逼了,昨天做了半天的无用功(写了改,改了写),哎!以为是替换的数据类型造成的问题,现在发现,完全是驴头不对马嘴!


错误的XMI配置如下:


<if test="pcodeList.size() != null and pcodeList.size() > 0">
	AND ar.PCODE IN 
	<foreach collection="pcodeList" item="pcode" index="index" open="(" separator="," close=")">
		#{pcode}
	</foreach>
</if>


正确的配置如下:


<if test="pcodeList != null and pcodeList.size() > 0">
	AND ar.PCODE IN 
	<foreach collection="pcodeList" item="pcode" index="index" open="(" separator="," close=")">
		#{pcode}
	</foreach>
</if>



因为一下改了太多地方,找错就会出现很大的误差,以后一定要引以为戒!


感谢某某某提供解惑:http://blog.csdn.net/qq279071978/article/details/53745116

欢迎留言