package com.microservices.pms.project.mapper;

import com.microservices.common.datasource.annotation.Slave;
import com.microservices.pms.project.domain.ForgeIssues;
import com.microservices.pms.project.domain.PmsIssuesLinkedCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * 用户表 数据层
 *
 * @author microservices
 */
@Slave
@Mapper
public interface ForgeIssuesMapper {

    List<ForgeIssues> getBriefIssues();

    int updateForIssues(ForgeIssues forgeIssues);


    // 批量查询多个linkableId关联的所有工作项
    List<Long> selectLinkedIssueIdsByLinkableIds(@Param("linkableIds") List<Long> linkableIds,
                                                 @Param("linkableType") String linkableType,
                                                 @Param("beLinkableType") String beLinkableType);

    PmsIssuesLinkedCount getIssuesLinkedCount(@Param("linkIssueIdSet") Set<Long> linkIssueIdSet);
}
