package com.app.mapper.order;

import com.app.dto.order.OpenCourseOrderExportDto;
import com.app.entity.order.OpenCourseOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OpenCourseOrderMapper extends BaseMapper<OpenCourseOrder> {

    /**
     * 功能描述：开课订单导出
     *
     * @param schoolYear
     * @param semester
     * @param schoolId
     * @return
     */
    List<OpenCourseOrderExportDto> exportAll(Integer schoolYear, Integer semester, String schoolId);

    /**
     * 功能描述：根据开课查询订单项
     *
     * @param openCourseId
     * @return
     */
    List<OpenCourseOrderExportDto> findByOpenCourseId(String openCourseId);

    IPage<OpenCourseOrder> findAllPage(@Param("accountId") String accountId, @Param("transactionId") String transactionId, @Param("childName") String childName, @Param("phoneNumber") String phoneNumber,
                                       @Param("schoolId") String schoolId, @Param("schoolYear") Integer schoolYear, @Param("semester") Integer semester, @Param("className") String className, @Param("gradeName") String gradeName, @Param("orderState") Integer orderState ,@Param("organIds")List<String> organIds, IPage page);

}
