<if test="list!=null and list.size>0"> and create_by in <foreach collection="list" item="item" separator="," open="(" close=")" > #{item} </foreach> </if>