<!-- 查询相关(mybatis-oracle) --><selectid="listByPage"resultMap="BaseResultMap">
select <includerefid="baseCol"/> from MY_TABLE
<where><!-- 一般普通的下拉框多选的,前端json: nameArr = '张三,李四,王五,五六' --><iftest="nameArr != null and nameArr != ''">
and NAME in
<foreachcollection="nameArr.split(',')"open="("close=")"separator=","item="item">
#{item}
</foreach></if><!-- 数据填写多个用逗号隔开或者有特殊符号分隔的查询写法,比如前端json: accoArr = '222,333#444#555',根据实际业务里面可以写成'%'||#{item}或者#{item}||'%' --><iftest="accoArr != null and accoArr != ''">
and ACCO in
(
select ACCO from MY_TABLE t
where
<foreachcollection="accoArr.split('#')"open="("close=")"separator="or"item="item">
t.ACCO like '%'||#{item}||'%'
</foreach>
)
</if><!-- 查空 --><iftest="appointStatus != null and appointStatus != ''"><iftest="appointStatus == 1">
and RESIGNATION_DATE is null
</if><iftest="appointStatus == 2">