翻譯過來就是
原因:java.lang.IllegalArgumentException:無效比較:java.util.ArrayList和java.lang.String
這個情況在list集合查找數據的sql中出的問題,在接受list的時候加了判斷 list!='' ,引起了集合與String類型的比較
<choose>
<when test="names!= null and names.size!=''">
and name in
<foreach collection="names" item="name" index="index" open="(" close=")" separator=",">
#{name}
</foreach>
</when>
<otherwise>
and name= ''
</otherwise>
</choose>
換成
<choose>
<when test="names!= null and names.size>0">
and name in
<foreach collection="names" item="name" index="index" open="(" close=")" separator=",">
#{name}
</foreach>
</when>
<otherwise>
and name= ''
</otherwise>
</choose>
