日期:2014-05-16 浏览次数:20765 次
转载:感谢 涂剑凯 ? 一:传入参数仅有数组 ???????<select id="GetEmailList_Test"??resultClass="EmailInfo_"> java代码: ????????????string[] strValue = new string[] { "1", "2", "3" }; ????????????Reader.QueryForList<EmailInfoModel>("WebApp_Ibatisnet.dao.GetEmailList_Test", strValue ); 二:传入参数有数组,且有其他数据 ????????????TestIn ti = new TestIn(); 实体类: ???public class TestIn ????????public int Count
http://blog.sina.com.cn/bdstjk
????????????select *
????????????from MailInfo with (nolock)
????????????where ID in
????????????????<iterate open="(" close=")" conjunction="," >
????????????????????#[]#
????????????????</iterate>
????????</select>
????????<select id="GetEmailList_Test3" parameterClass="TestIn" resultClass="EmailInfo_">
????????????select??top(#Count#)*
????????????from MailInfo with (nolock)
????????????where ID in
????????????<iterate open="(" close=")" conjunction="," property="ArrValue" >
????????????????#ArrValue[]#
????????????</iterate>
????????</select>
????????????ti.Count = 1;
????????????ti.ArrValue = strValue;
????????????return Reader.QueryForList<EmailInfoModel>("WebApp_Ibatisnet.dao.GetEmailList_Test3", ti);
????{
????????private int count;
????????{
????????????get { return count; }
????????????set { count = value; }
????????}