<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionCollectMapper">
    <!--试题取消收藏-->
    <delete id="cancelCollect">
        delete from t_question_collect where questionid=#{collect.questionid} and userid=#{collect.userid}
    </delete>
    <!--获取试题是否收藏列表-->
    <select id="listCollect" resultType="java.lang.String">
        select c.questionid
        from t_question_collect c where c.userid=#{userid} and c.questionid in
        <foreach item="questionid" collection="questionids" open="(" separator="," close=")">
            #{questionid}
        </foreach>
    </select>
</mapper>
