关于参数的类型 有四种类型:
http://www.07net01.com/zhishi/402787.html
以上链接有所介绍,四种类型有:单个参数、多个参数、Map封装参数、List封装IN
如果想要写诸如下边的语句,即 单个参数 + List封装IN 则可使用Map ( Map<String,Object>) 类型放入;
参考链接:http://yuelangyc.iteye.com/blog/2006873
<select id="getSth" parameterType="java.util.Map" resultMap="strInfo">
SELECT * FROM table
WHERE paraid='${para1}' and paracode in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
本文参考链接:
http://www.07net01.com/zhishi/402787.html
http://yuelangyc.iteye.com/blog/2006873