package com.microservices.dms.referral.mapper;

import com.microservices.common.datasource.annotation.Slave;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.referral.vo.*;
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
@Slave
public interface TalentReferralMapper {

    List<IssuesVo> selectIssuesCondition(IssuesVo issuesVo);

    List<IssuesVo> countIssuesAssigner(@Param("projectId") Long projectId);

    List<PullRequestVo> countPRUser(@Param("projectId") Long projectId);

    IssuesVo selectIssuesById(@Param("id") Long id);

    PullRequestVo selectPRById(@Param("id") Long id);

    List<Long> selectIssuesAssigners(@Param("issueId") Long issueId);

    String selectRepositoriesUrl(@Param("id") Long id);

    Long selectIdByLogin(@Param("login") String login);

    List<TaskVo> selectTaskByStatus(@Param("statusIds") List<Integer> statusIds);

    Map<String, Object> selectUsersById(@Param("id") Long id);

    TaskVo selectTaskById(@Param("id") Long id);

    List<ExpertVo> selectExpertsBy(ExpertVo expertVo);

    List<KeyValVo<Long,String>> allTaskWithExpertIds(@Param("type") String type);

    TaskVo selectCompetitionById(Long competitionId);

    List<TaskVo> selectCompetitionIdByStatus();

    PrInfoVo selectPRInfoById(@Param("id") Integer id);

}
