mybatisforeach tag usage

The foreach tag is the same as our Java is to traverse iterations, usually after the in keyword select * from tableName where id in (1,2) I usually put It serves as the condition in(1,2) select * from user where userRole in #{roleIds} Foreach attribute: collection: Iteration means passing Parameters entered item: an alias representing the iteration of each element in the collection index: used to represent the position iterated to during the iteration process open: Indicates what to start with separator: Indicates what symbol is used as a separator between each iteration close: Indicates what has ended

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索