package com.ym.mec.biz.dal.dao;

import com.ym.mec.auth.api.entity.SysUser;
import com.ym.mec.biz.dal.dto.CourseReviewDto;
import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.biz.dal.entity.CourseScheduleReview;
import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface CourseScheduleReviewDao extends BaseDAO<Integer, CourseScheduleReview> {

    /**
     * 网管课评价列表
     *
     * @param params
     * @return
     */
    List<CourseReviewDto> getPracticeGroupReviewList(Map<String, Object> params);

    /**
     * 网管课评价总条数
     *
     * @param params
     * @return
     */
    Integer countPracticeGroupReviews(Map<String, Object> params);

    /**
     * 教务网管课评论列表
     *
     * @return
     */
    List<CourseScheduleReview> getPracticeGroupReview4EduList(Map<String, Object> params);

    /**
     * 教务网管课评论条数
     *
     * @return
     */
    Integer countPracticeGroupReviews4Edu(Map<String, Object> params);

    /**
     * @param courseScheduleId:
     * @param studentId:
     * @return java.util.List<com.ym.mec.biz.dal.entity.CourseScheduleReview>
     * @describe 根据学生和课程获取评论
     * @author Joburgess
     * @date 2020/3/13
     */
    CourseScheduleReview findByCourseScheduleAndStudent(@Param("courseScheduleId") Long courseScheduleId,
                                                        @Param("studentId") Integer studentId);

    /**
     * @param courseScheduleIds:
     * @return java.util.List<com.ym.mec.biz.dal.entity.CourseScheduleReview>
     * @describe 获取课程的评价
     * @author Joburgess
     * @date 2020/3/13
     */
    List<CourseScheduleReview> findByCourseSchedules(@Param("courseScheduleIds") List<Long> courseScheduleIds);

    /**
     * 获取学生课程评价
     *
     * @param courseScheduleIds
     * @param studentId
     * @return
     */
    List<CourseScheduleReview> findByCourseSchedulesAndStudentId(@Param("courseScheduleIds") List<Long> courseScheduleIds, @Param("studentId") Integer studentId);

    /**
     * 获取已结束的课程列表
     *
     * @param classGroupId
     * @return
     */
    List<CourseReviewDto> findByClassGroupId(@Param("classGroupId") Long classGroupId);

    /**
     * 根据课程id获取老师评价
     *
     * @param courseScheduleId
     * @return
     */
    List<CourseScheduleReview> findByCourseScheduleId(@Param("courseScheduleId") Long courseScheduleId);

    /**
     * 批量插入评价
     *
     * @param courseScheduleReviews
     * @return
     */
    int batchAdd(@Param("courseScheduleReviews") List<CourseScheduleReview> courseScheduleReviews);

    /**
     * 根据班级id获取班级学生
     *
     * @param classGroupId
     * @return
     */
    List<SysUser> findStudentByClassGroupId(@Param("classGroupId") Long classGroupId);

    /**
     * 删除课程评价
     *
     * @param courseScheduleId
     */
    void delByCourseScheduleId(@Param("courseScheduleId") Long courseScheduleId);

    /**
     * 删除课程评价
     *
     * @param courseScheduleIds
     */
    void delByCourseScheduleIds(@Param("courseScheduleIds") List<Long> courseScheduleIds);

    /**
     * 线上课评价列表
     *
     * @param params
     * @return
     */
    List<CourseReviewDto> getOnlineCourseReviewList(Map<String, Object> params);

    /**
     * 线上课评价统计
     *
     * @param params
     * @return
     */
    Integer countOnlineCourseReviews(Map<String, Object> params);

    /**
     * vip课评价列表
     * @param params
     * @return
     */
    List<CourseReviewDto> getVipCourseReviewList(Map<String, Object> params);

    /**
     * vip课评价统计
     * @param params
     * @return
     */
    Integer countVipCourseReviews(Map<String, Object> params);
}
