package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.entity.StudentCompetition;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface StudentCompetitionDao extends BaseDAO<Long, StudentCompetition> {

    List<StudentCompetition> queryStudentCompetitions(Map<String, Object> params);

    int countStudentCompetitions(Map<String, Object> params);

    /**
     * @describe 获取指定用户的参赛作品
     * @author Joburgess
     * @date 2020.11.10
     * @param userId:
     * @return com.ym.mec.biz.dal.entity.StudentCompetition
     */
    StudentCompetition getCompetitionWithUser(@Param("userId") Integer userId);

    /**
     * @describe 获取获奖名单
     * @author Joburgess
     * @date 2020.11.10
     * @return java.util.List<com.ym.mec.biz.dal.dto.StudentCompetitionRankingDto>
     */
    List<StudentCompetition> getWinnerList();

    /**
     * @describe 获取指定奖项级别的作品编号列表
     * @author Joburgess
     * @date 2020.11.10
     * @param prizeLevel:
     * @return java.util.Set<java.lang.Long>
     */
    Set<Long> getCompetitionsWithPrizeLevel(@Param("prizeLevel") Integer prizeLevel);

}
