package com.yihu.jw.patient.dao;

import com.yihu.jw.entity.patient.BasePatientGroupDictDO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface BasePatientGroupDictDao extends PagingAndSortingRepository<BasePatientGroupDictDO, String>, JpaSpecificationExecutor<BasePatientGroupDictDO> {
    Page<BasePatientGroupDictDO> findByCreateUserAndDel(String doctor,String del, Pageable pageable);


    @Query("select count(id) from BasePatientGroupDictDO where createUser=?1 and del='1'")
    int findByDoctorCount(String doctor);
}
