package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.*;
import com.ym.mec.biz.dal.entity.StudentApplyRefunds;
import com.ym.mec.biz.dal.entity.VipGroup;
import com.ym.mec.biz.dal.page.*;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface VipGroupService extends BaseService<Long, VipGroup> {

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroup]
     * @return void
     * @describe 创建vip课
     */
    void createVipGroup(VipGroupApplyDto vipGroup);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe 获取可购买vip课列表
     */
    PageInfo findStudentVipGroupList(StudentVipGroupQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/9
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe 获取vip课列表
     */
    PageInfo findVipGroups(VipGroupQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/9
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe 获取vip课教学记录
     */
    Map<String, Object> findVipGroupTeachingRecord(VipGroupTeachingRecordQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/9
     * @params [vipGroupId]
     * @return com.ym.mec.biz.dal.dto.TeachingRecordBaseInfo
     * @describe 获取vip课教学记录基本信息
     */
    TeachingRecordBaseInfo findTeachingRecordBaseInfo(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/9
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe 获取vip课学员
     */
    PageInfo findVipGroupStudents(VipGroupQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupId]
     * @return com.ym.mec.biz.dal.dto.VipGroupManageDetailDto
     * @describe 获取vip课详情
     */
    VipGroupManageDetailDto getVipGroupDetail(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/10
     * @params [vipGroup, onlineClassesUnitPrice, offlineClassesUnitPrice]
     * @return java.math.BigDecimal
     * @describe 计算课程购买总价
     */
    Map countVipGroupPredictFee(VipGroup vipGroup,BigDecimal onlineClassesUnitPrice,BigDecimal offlineClassesUnitPrice);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe 获取vip课考勤记录
     */
    PageInfo findVipGroupAttendances(VipGroupAttendanceQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupId]
     * @return com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto
     * @describe 学生端获取vip课详情
     */
    StudentVipGroupDetailDto getVipGroupShowDetail(Long vipGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupCostCountParamsDto]
     * @return com.ym.mec.biz.dal.dto.VipGroupCostCountDto
     * @describe vip课程费用计算
     */
    VipGroupCostCountDto vipGroupCostCount(VipGroupCostCountParamsDto vipGroupCostCountParamsDto);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupBuyParams]
     * @return void
     * @describe 购买vip课程
     */
    Map buyVipGroup(VipGroupBuyParamsDto vipGroupBuyParams) throws Exception;

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [callbackParams]
     * @return void
     * @describe 支付回调接口
     */
    void orderCallback(String callbackParams);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [vipGroupId, studentId]
     * @return void
     * @describe 申请退课
     */
    void applyRefund(Long vipGroupId,Long studentId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/3
     * @params [studentApplyRefunds]
     * @return void
     * @describe 退课申请审核
     */
    void applyRefundAudit(StudentApplyRefunds studentApplyRefunds);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/11
     * @params [queryInfo]
     * @return com.ym.mec.common.page.PageInfo
     * @describe vip财务记录
     */
    Map<String, Object> findVipGroupSalarys(VipGroupSalaryQueryInfo queryInfo);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/11
     * @params [courseScheduleId]
     * @return java.util.List<java.lang.String>
     * @describe 获取上课签到学员
     */
    List<String> findVipGroupAttendanceStudents(Long courseScheduleId);

    /**
     * @Author: Joburgess
     * @Date: 2019/10/12
     * @params [vipGroupId]
     * @return void
     * @describe 停止vip课
     */
    void stopGroup(Long vipGroupId);

    /**
     * 发放月度奖励
     * @return
     */
    boolean awardedMonthlyRewards();
    
}