<select id="getACheckId" resultType="string" parameterType="map">`
select * where t.contract_id = #{contractId}`
<if test="ids != null">`
and
<foreach collection="ids" index="index" item="idsItem" open="(" separator="or" close=")" >
t.part_insured_id in
<foreach collection="idsItem" index="index" item="id" open="(" separator="," close=")" >
#{id}
</foreach>
</foreach>
</if>
</select>