1.传入参数是数组 select id=Test resultClass=dto select * from UserInfo where userId in iterate open=( close=) conjunction=, #[]# /iterate /select 使用 string[] arrays = new string[] { 1, 2, 3 }; Reader.QueryForList?(Ibatisnet.dao.span styl
1.传入参数是数组
使用
string[] arrays = new string[] { "1", "2", "3" };
Reader.QueryForList<?>("Ibatisnet.dao.<span style="font-family: Arial, Helvetica, sans-serif;">Test</span><span style="font-family: Arial, Helvetica, sans-serif;">", strValue ); </span>2.使用上面的数组还可以使用对象中数组方式,写法有点区别
<select id="Test" resultClass="dto">
select *
from UserInfo
where userId in
<iterate open="(" close=")" conjunction="," property="ArrValue" >
#ArrValue[]#
</iterate>
</select>
<select id="queryAllUserinfo" parameterClass="dto"
resultClass="dto">
SELECT u.USERID,ui.id,
u.USERNAME,u.ACCOUNT,u.SEX,ui.specialty,ui.address,ui.idnumber,ui.school,ui.nation,ui.political_landscape,ui.phone,ui.email,ui.qq,ui.job_category,ui.stu_class,ui.create_tm,ui.modify_tm
from eauser u,TB_USER_INFO ui
WHERE u.ACCOUNT = ui.ACCOUNT
<dynamic>
<isNotEmpty prepend="AND" property="userids">
ui.id in ($userids$)
</isNotEmpty>
</dynamic>
</select>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号