把charindex替换为instr
<select id="selectAllCount" resultType="Long" parameterType="list">
select COUNT(1)
from notice
<where>
<if test="list != null and list.size()>0 ">
<foreach collection="list" item="id" open="(" close=")" separator="or">
instr(','+notice_org_ids+',',','+#{id}+',')>0
</foreach>
</if>
</where>
</select>