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类型可以这样直接判断。