package com.app.mapper.order;

import com.app.entity.order.OpenCourseOrderItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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 OpenCourseOrderItemMapper extends BaseMapper<OpenCourseOrderItem> {

    /**
     * 功能描述：查询[我的课程]分页
     *
     * @param accountId
     * @param state
     * @param page
     * @return
     */
    IPage<OpenCourseOrderItem> myOpenCoursePage(@Param("accountId") String accountId, @Param("state") Integer state, Page page);

    List<OpenCourseOrderItem> myOpenCourse(@Param("accountId") String accountId, @Param("state") Integer state);

    Integer selectClassEcharts(@Param("schoolYear") Integer schoolYear, @Param("semester") Integer semester, @Param("schoolId") String schoolId, @Param("gradeName") String gradeName, @Param("className") String className);

    Integer selectHobbyEcharts(@Param("schoolYear") Integer schoolYear, @Param("semester") Integer semester, @Param("schoolId") String schoolId, @Param("name") String name);

    List<String> findClassName();

    Integer exportClassName(@Param("className") String className, @Param("schoolId") String schoolId);

    List<String> findName(@Param("schoolId") String schoolId);

}
