| | |
| | | <select id="selectByRoleIds" resultType="org.springblade.mdm.basesetting.producedivision.entity.MdmUser"> |
| | | SELECT id,account,name,real_name,role_id,dept_id FROM blade_user |
| | | <where> |
| | | is_deleted=0 |
| | | <if test="idList != null and idList.size() > 0"> |
| | | |
| | | and (1=2 or |
| | | <foreach collection="idList" item="item" separator=" OR "> |
| | | role_id like ${item} |
| | | <bind name="pattern" value="'%' + item + '%'"/> |
| | | role_id like '%${item}%' |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | <!-- 如果列表为空,可以加一个永假条件避免全表扫描,例如:--> |
| | | <if test="idList == null or idList.size() == 0"> |