package com.xunwang.education.service;

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

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

/**
 * <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
     */
    List<TeacherCourses> showPersonCourse(String uid);

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

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

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

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

    /**
     * 查询老师详情总成交次数和最近成交时间
     * @param uid
     */
    Map queryCountAndLastTime(String uid);
}
