<mapper namespace="com.liulei.garbagesorting.mapper.UserCollectionMapper">
<select id="getCollectionsByQuestionListAndOpenId" resultType="com.liulei.garbagesorting.pojo.UserCollection">
SELECT * FROM user_collection
WHERE question_id IN
<foreach collection="questionList" item="questionId" open="(" separator="," close=")">
#{questionId}
</foreach>
AND open_id = #{openId}
</select>
</mapper>