package com.xhkjedu.sstudy.mapper.question;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sstudy.model.question.TUserBasket;
import com.xhkjedu.sstudy.vo.question.UserBasketVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserBasketMapper extends TkMapper<TUserBasket> {
    /**
     * 清空试题篮
     * @Param [userid, subjectid]
     * @Author ywx
     * @Date 2020/6/9 10:54
     * @return java.lang.Integer
     **/
    Integer deleteBySubjectId(@Param("userid") Integer userid, @Param("subjectid") String subjectid);

    /**
     * 删除题型下指定试题
     * @Param [userid, qtypeid]
     * @Author ywx
     * @Date 2020/6/9 11:05
     * @return java.lang.Integer
     **/
    Integer deleteByTypeId(@Param("userid") Integer userid, @Param("qtypeid") String qtypeid);
    //删除听力题
    Integer deleteTlt(@Param("userid") Integer userid);

    /**
     * 列表
     * @Param [basket]
     * @Author ywx
     * @Date 2020/6/9 11:17
     * @return java.util.List<com.xhkjedu.vo.question.UserBasketVo>
     **/
    List<UserBasketVo> findAll(@Param("userid") Integer userid, @Param("subjectid") String subjectid);

    /**
     * 获取用户试题篮id
     * @Param [userid, questionid]
     * @Author ywx
     * @Date 2020/7/1 17:52
     * @return java.lang.Integer
     **/
    Integer getUbidByUserIdQuestionId(Integer userid, String questionid);

    /**
     *功能描述 用户删除试题栏中指定试题
     * @author WN
     * @date 2020/7/15
     * @param  * @param userid
     * @param questionid
     * @return java.lang.Integer
     */
    Integer deleteByQuestioniduid(Integer userid, String questionid);

    //获取试题处理题型
    Integer getCtypeByQtypeid(@Param("qtypeid")String qtypeid);
}
