其他分享
首页 > 其他分享> > mybatis中if标签用法

mybatis中if标签用法

作者:互联网

1         <if test="grouptype != null ">
2             <if test="grouptype == 0">
3                 and i.ent_id not in (select id from group_type)
4             </if>
5             <if test="grouptype == 1">
6                 and i.ent_id in (select eid from group_type)
7             </if>
8         </if>

mapper传入参数为map,其中的int类型可以这样直接判断。

标签:mapper,group,标签,用法,ent,mybatis,type,id,select
来源: https://www.cnblogs.com/blue-rain/p/16373360.html