package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.CloudTeacherOrderDto;
import com.ym.mec.biz.dal.entity.CloudTeacher;
import com.ym.mec.biz.dal.entity.CloudTeacherOrder;
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
import com.ym.mec.common.service.BaseService;

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


public interface CloudTeacherOrderService extends BaseService<Long, CloudTeacherOrder> {


    /**
     * 将订单详情云教练加入云教练购买列表
     *
     * @param order
     * @return
     */
    Boolean addOrderDetail2CloudTeacher(StudentPaymentOrder order);


    /**
     * 检测云教练是否开始生效，乐团上课后开始生效
     *
     * @return
     */
    Boolean checkCloudOrderStart();

    /**
     * 将生效的云教练订单加入
     *
     * @param cloudTeacherOrder
     * @return
     */
    CloudTeacher addStudentCloudTeacher(CloudTeacherOrder cloudTeacherOrder);

    /**
     * 获取乐团云教练订单
     *
     * @param studentIds
     * @param musicGroupId
     * @return
     */
    List<CloudTeacherOrder> getStudentCloudTeacherOrders(List<Integer> studentIds, String musicGroupId);

    /**
     * 获取乐团报名的云教练订单
     *
     * @param studentId
     * @param musicGroupId
     * @return
     */
    List<CloudTeacherOrder> getStudentCloudTeacherOrder(Integer studentId, String musicGroupId);

    /**
     * 退云教练
     * @param cloudTeacherOrders
     * @param refundAmount
     * @return
     */
    Boolean quitCloudTeacherOrders(List<CloudTeacherOrder> cloudTeacherOrders, BigDecimal refundAmount);

    /**
     * 退云教练
     * @param order
     * @param refundAmount
     * @return
     */
    Boolean quitCloudTeacherOrder(CloudTeacherOrder order, BigDecimal refundAmount);
	
	/**
	 * 根据studentPaymentOrder表id查询对象
	 * @param orderId
	 * @return
	 */
	CloudTeacherOrder queryByOrderId(Long orderId);
    
    /**
     * 根据订单编号查询订单详情
     * @param orderId
     * @return
     */
    CloudTeacherOrderDto queryOrderInfoByOrderId(Long orderId);

}
