package com.yihu.jw.base.dao.voluntary;

import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentPeopleDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
public interface VoluntaryRecruitmentPeopleDao extends PagingAndSortingRepository<VoluntaryRecruitmentPeopleDO, String>, JpaSpecificationExecutor<VoluntaryRecruitmentPeopleDO> {

    boolean existsByPhone(String phone);

    List<VoluntaryRecruitmentPeopleDO> queryByIdIn(String[] id);

    @Query("select count(1) from VoluntaryRecruitmentPeopleDO where companyId = ?1 ")
    Integer findByCompanyId(String CompanyId);

}
