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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.auth.api.entity.SysUser;
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.*;
import com.yonge.cooleshow.common.entity.HttpResponseResult;

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

/**
 * 学生表 服务类
 *
 * @author liweifan
 * @date 2022-03-23
 */
public interface StudentService extends IService<Student> {
    /***
     * 查询学员详情
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/23 17:49
     * @return: com.yonge.cooleshow.biz.dal.vo.TeacherVo
     */
    StudentVo detail(Long userId);

    /**
     * 查询学员详情
     *
     * @param phone
     * @return
     */
    StudentVo detailByPhone(String phone);

    /**
     * 自定义分页
     *
     * @author liweifan
     * @date 2022-03-23
     */
    IPage<StudentVo> selectPage(IPage<StudentVo> page, StudentSearch studentSearch);

    /***
     * 查询学生端首页用户信息
     * @author liweifan
     * @param: user
     * @updateTime 2022/3/29 15:00
     * @return: com.yonge.cooleshow.biz.dal.vo.StudentHomeVo
     */
    StudentHomeVo queryUserInfo(SysUser user);

    /***
     * 设置声部
     * @author liweifan
     * @param: id
     * @param: toLongList
     * @updateTime 2022/4/7 9:56
     * @return: java.lang.Integer
     */
    Integer setSubject(Long id, String subjectIds);

    List<Subject> querySubject(Long userId);

    /***
     * 获取声部下拉框
     * @author liweifan
     * @param: id
     * @updateTime 2022/5/9 10:16
     * @return: java.util.List<com.yonge.cooleshow.biz.dal.entity.Subject>
     */
    List<Subject> querySubjectItem(Long id, String type);

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

    /**
     * 学院绑定老师
     *
     * @param phone
     * @param userId
     * @param isUpdate
     * @return
     */
    HttpResponseResult<Map<String, TeacherVo>> bindTeacher(String phone, Long userId, Boolean isUpdate);
}