湖南中海建设集团有限公司网站,流感吃什么药效果最好,易加互动平台,优化网站推广教程整站目录 一、简介
二、使用
1、参数为list
2、参数为Array
3、参数为Map
XML中大于、小于、不等于符号使用 一、简介
在xml中使用in查询需要使用foreach标签
foreach itemitem collectionlist indexindex open( sep…目录 一、简介
二、使用
1、参数为list
2、参数为Array
3、参数为Map
XML中大于、小于、不等于符号使用 一、简介
在xml中使用in查询需要使用foreach标签
foreach itemitem collectionlist indexindex open( separator, close)#{item}/foreach
foreach的属性 item表示集合中每一个元素进行迭代的别名。 collection为参数类型。 index指定的名字表示每次迭代的位置。 open表示该语句以什么开始。 separator表示在每次进行迭代时以什么符号为分隔符。 close表示以什么结束 二、使用
1、参数为list
mapper
ListString selectName(ListObject ids); xml
select idselectName resultTypeStringselect name from sys_app where id in foreach itemitem collectionlist indexindex open( separator, close)#{item}/foreach/select2、参数为Array
mapper:
ListString selectName(String[] ids);
xml:
select idselectName resultTypestringselect name from sys_app where id in foreach itemitem collectionarray indexindex open( separator, close)#{item}/foreach/select
3、参数为Map ListInteger list new ArrayList();list.add(1);list.add(2);MapString,Object map new HashMap();map.put(ids,list);map.put(parms,sss); mapper:
ListString selecyName(MapString,Object map);xml:
select idselectName resultTypeStringselect name from sys_app where id in foreach itemitem collectionids indexindex open( separator, close)#{item}/foreach/select
XML中大于、小于、不等于符号使用
符号原符号替换符号小于lt;小于等于lt;大于gt;大于等于gt;不等于lt;gt;与amp;单引号apos双引号quot;