package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.CourseGroupCreateDto;
import com.ym.mec.biz.dal.dto.GroupHeadInfoDto;
import com.ym.mec.biz.dal.entity.CoursesGroup;
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
import com.ym.mec.biz.dal.page.GroupCourseScheduleQueryInfo;
import com.ym.mec.biz.dal.page.GroupQueryInfo;
import com.ym.mec.common.entity.HttpResponseResult;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;

import java.util.Map;

public interface CoursesGroupService extends BaseService<Long, CoursesGroup> {

    /**
     * @describe 课程创建
     * @author Joburgess
     * @date 2020/3/8
     * @param courseGroupCreateInfo: 课程组创建信息
     * @return void
     */
    HttpResponseResult createCourseGroup(CourseGroupCreateDto courseGroupCreateInfo);

    /**
     * @describe 获取教师课程组列表
     * @author Joburgess
     * @date 2020/3/8
     * @param teacherId: 教师编号
     * @return java.util.List<com.ym.mec.biz.dal.dto.CourseGroupTeacherCardDto>
     */
    PageInfo findTeacherCourseGroups(Integer teacherId, GroupCourseScheduleQueryInfo queryInfo);

    /**
     * @describe
     * @author Joburgess
     * @date 2020/4/6
     * @param queryInfo:
     * @return com.ym.mec.common.page.PageInfo
     */
    PageInfo findTeacherCourseGroupsWithWeb(GroupQueryInfo queryInfo);

    /**
     * @describe
     * @author Joburgess
     * @date 2020/4/6
     * @param queryInfo:
     * @return com.ym.mec.common.page.PageInfo
     */
    PageInfo findStudentCourseGroupsWithWeb(GroupQueryInfo queryInfo);

    /**
     * @describe 获取课程对应班级头部信息
     * @author Joburgess
     * @date 2020/3/10
     * @param courseScheduleId: 课程编号
     * @return com.ym.mec.biz.dal.dto.GroupHeadInfoDto
     */
    GroupHeadInfoDto getGroupHeadInfo(Long courseScheduleId);

    /**
     * @describe 获取课程组详情
     * @author Joburgess
     * @date 2020/3/12
     * @param groupId:
     * @return Map<String,Object>
     */
    Map<String,Object> getGroupDetail(Long groupId);

    /**
     * @describe 购买课程组
     * @author Joburgess
     * @date 2020/3/11
     * @param userId:
     * @param courseGroupId:
     * @return void
     */
    HttpResponseResult buyCourseGroup(Integer userId, Long courseGroupId, boolean isUseBalancePayment) throws Exception;

    HttpResponseResult orderCallback(StudentPaymentOrder studentPaymentOrder);

    /**
     * @describe 无学生课程组提醒
     * @author Joburgess
     * @date 2020/3/17
     * @param :
     * @return void
     */
    void noStudentsCourseGroupRemind();

    /**
     * @describe 结束已完成的课程组
     * @author Joburgess
     * @date 2020/3/18
     * @param :
     * @return void
     */
    void finishCourseGroup();
}
