package com.xunwang.education.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xunwang.education.entity.TeacherCourses;
import com.xunwang.education.entity.dto.MyPublishTeacherCoursesDto;
import com.xunwang.education.entity.dto.MyTeacherCourseDetailDto;
import com.xunwang.education.entity.dto.MyTeacherCoursesDto;
import com.xunwang.education.entity.vo.TeacherCoursesVo;
import com.xunwang.education.entity.vo.TeacherList;
import com.xunwang.education.entity.vo.TeacherListQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 老师课程发布 服务类
 * </p>
 *
 * @author Long
 * @since 2022-11-29
 */
public interface TeacherCoursesService extends IService<TeacherCourses> {

    /**
     * 添加课程发布信息
     * @param teacherCoursesVo
     * @param uid
     */
    int addTeacherCourses(TeacherCoursesVo teacherCoursesVo, String uid);

    /**
     * 查询个人已发布的课程s
     * @parm uid
     * @return
     */
    HashMap<String, Object> showPersonCourse(HttpServletRequest request);

    /**
     * 删除已发布的课程
      * @param courseId
     * @return
     */
    int deletePersonCourse(int courseId);

    /**
     * 分页查询
     * 查询全部老师根据条件
     * @param queryObj
     * @return
     */
    List<MyTeacherCoursesDto> queryAllByConditions(TeacherListQuery queryObj);

    /**
     * 查询个人是否有正在审核的课程
     * @param uid
     * @return
     */
    boolean queryPersonVerifyCourse(String uid);

    /**
     * 查询个人未成交的课程数
     * @param uid
     * @return
     */
    int queryPersonNoDeal(String uid);

    boolean updatePersonDisplay(HttpServletRequest request);

    int getTeacherViewCount(String uid);

    List<TeacherCourses> getTeacherCourseId(String uid);

    /**
     * 根据课程id查询课程是否上锁或下架
     * @param courseId
     * @return
     */
    String queryLockOrDisplay(String courseId);

    /**
     * 锁定课程号
     * @param courseId
     * @param version
     * @return
     */
    boolean lockCourseId(String courseId, String version);

    /**
     * 查询个人课程详情信息
     * @param courseId
     * @return
     */
    MyTeacherCourseDetailDto getPersonCourseDetailById(String courseId);

    /**
     * TODO
     *
     * @Description 按审核状态查询所有 课程详情
     * @Author Paul  Email:8203193@qq.com
     * @Version 1.0
     * @Date 2023/6/15 16:41
     *
     */
    List<MyTeacherCourseDetailDto>  getAllCourseDetailListByVerifyStatus(String verifyStatus);



}
