<select id="queryByCondTotal" resultType="int" parameterType="java.util.Map" >
select count(id)
from notice_task
<where>
<if test="bldgIds!=null and bldgIds.size()>0">
<foreach item="item" index="index" collection="bldgIds"
open="(" separator=" OR " close=")">
find_in_set(#{item}, bldgId)
</foreach>
</if>
<if test="bldgIds==null or bldgIds.size()==0">
and 0=1
</if>
<if test="bldgId!=null and bldgId!='' " >
and find_in_set(#{bldgId,jdbcType=VARCHAR}, bldgId)
</if>
<if test="selType!=null" >
and selType = #{selType,jdbcType=INTEGER}
</if>
<if test="keyWord!=null and keyWord!='' " >
and upper(title) LIKE CONCAT(
</if>
</where>
</select>