package com.yonge.cooleshow.biz.dal.dao;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.dto.search.QueryMyFollowSearch;
import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
import com.yonge.cooleshow.biz.dal.entity.Student;
import com.yonge.cooleshow.biz.dal.entity.Subject;
import com.yonge.cooleshow.biz.dal.vo.MyFollow;
import com.yonge.cooleshow.biz.dal.vo.StudentVo;
import org.apache.ibatis.annotations.Param;

public interface StudentDao extends BaseMapper<Student> {
    /***
     * 查询详情
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/24 18:14
     * @return: com.yonge.cooleshow.biz.dal.vo.StudentVo
     */
    StudentVo detail(@Param("userId") Long userId);
    /***
     * 查询详情
     * @author liweifan
     * @param: phone
     * @updateTime 2022/3/24 18:14
     * @return: com.yonge.cooleshow.biz.dal.vo.StudentVo
     */
    StudentVo detailByPhone(@Param("phone")String phone);

    /**
     * 自定义分页
     */
    List<StudentVo> selectPage(@Param("page") IPage page, @Param("param") StudentSearch studentSearch);

    /***
     * 设置学员声部
     * @author liweifan
     * @param: id
     * @param: subjectIds
     * @updateTime 2022/4/7 10:12
     * @return: java.lang.Integer
     */
    Integer setSubject(@Param("id") Long id, @Param("subjectIds") String subjectIds);
    /**
     * @param
     * @return java.util.List<com.yonge.cooleshow.biz.dal.entity.Subject>
     * @description: 获取学生声部列表
     * @author zx
     * @date 2022/3/25 09:38
     */
    List<Subject> querySubject(@Param("userId") Long userId);
    /***
     * 获取声部下拉框
     * @author liweifan
     * @param: id
     * @updateTime 2022/5/9 10:17
     * @return: java.util.List<com.yonge.cooleshow.biz.dal.entity.Subject>
     */
    List<Subject> querySubjectItem(@Param("userId") Long id,@Param("type")  String type);

    /**
     * 我的关注
     *
     * @param page
     * @param query
     * @return
     */
    List<MyFollow> queryMyFollow(@Param("page") IPage page, @Param("param") QueryMyFollowSearch query);

}