package com.ankaibei.workFlow.webadmin.ankaibei.mapper;

import com.ankaibei.workFlow.webadmin.ankaibei.entity.ProjectTeamInfoEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author lwq
 * @version 1.0
 * @description:
 * @date 2022/9/13 10:27
 */
public interface ProjectTeamMapper extends JpaRepository<ProjectTeamInfoEntity, Integer> {

    /**
     * 根据项目组名称查询
     */
    List<ProjectTeamInfoEntity> findByProjectTeamNameEquals(String projectTeamName);

    /**
     * 根据项目id查询
     */
    List<ProjectTeamInfoEntity> findByProjectIdEquals(String projectId);


    /**
     * 根据项目组名称查询分页
     */
    Page<ProjectTeamInfoEntity> findAllByProjectTeamNameLike(String projectTeamName, Pageable pageable);

    /**
     * 分页查询
     */
    @Override
    Page<ProjectTeamInfoEntity> findAll(Pageable pageable);

    List<Integer> findTeamUserByProjectId(Integer projectId);
}
