BaseComplaintDao.java 1014 B

123456789101112131415161718192021
  1. package com.yihu.jw.complaint;
  2. import com.yihu.jw.entity.base.complaint.BaseComplaintDO;
  3. import com.yihu.jw.entity.base.complaint.BaseComplaintDictDO;
  4. import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
  5. import org.springframework.data.jpa.repository.Query;
  6. import org.springframework.data.repository.PagingAndSortingRepository;
  7. import java.util.List;
  8. public interface BaseComplaintDao extends PagingAndSortingRepository<BaseComplaintDO, String>, JpaSpecificationExecutor<BaseComplaintDO> {
  9. @Query("select count(1) from BaseComplaintDO t where t.isDel='1' and t.status=?1 and t.complaintId=?2")
  10. Integer getCountByStatusAndComplaintId(String status,String complatientId);
  11. @Query("select count(1) from BaseComplaintDO t where t.isDel='1' and t.status=?1 ")
  12. Integer getCountByStatus(String status);
  13. @Query("select count(1) from BaseComplaintDO t where t.isDel='1' and t.status=?1 and t.patient=?2")
  14. Integer getCountByStatusByPatient(String status,String patient);
  15. }