package com.sqx.modules.course.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.course.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CourseDao extends BaseMapper<Course> {

    int updateDelete(@Param("id") Long id);

    List<Map<String, Object>> selectCourse(@Param("classifyId") Long classifyId,
                                           @Param("title") String title, @Param("isRecommend") Integer isRecommend,
                                           @Param("status") Integer status, @Param("bannerId") Long bannerId,
                                           @Param("sort") Integer sort, @Param("startTime") String startTime,
                                           @Param("endTime") String endTime, @Param("userId") Long userId,
                                           @Param("isPrice") Integer isPrice, @Param("over") Integer over,
                                           @Param("wxCourse") Integer wxCourse, @Param("dyCourse") Integer dyCourse,
                                           @Param("wxShow") Integer wxShow, @Param("dyShow") Integer dyShow);

    List<Map<String, Object>> selectCourseAdmin(@Param("classifyId") Long classifyId,
                                            @Param("title") String title,@Param("isRecommend") Integer isRecommend,
                                            @Param("status") Integer status,@Param("bannerId") Long bannerId,
                                            @Param("sort") Integer sort,@Param("startTime") String startTime,
                                            @Param("endTime") String endTime,@Param("userId") Long userId,
                                            @Param("isPrice") Integer isPrice,@Param("over") Integer over,
                                            @Param("wxCourse") Integer wxCourse,@Param("dyCourse") Integer dyCourse,
                                            @Param("wxShow") Integer wxShow,@Param("dyShow") Integer dyShow);

    /**
     * 根据title 模糊查询短剧
     * @param title
     * @return
     */
    List<Map<String, Object>> selectCourseTitle(@Param("title")String title);

}
