AccountDao.java 991 B

123456789101112131415161718192021222324252627
  1. package com.yihu.jw.dao;/**
  2. * Created by nature of king on 2018/5/10.
  3. */
  4. import com.yihu.jw.entity.health.bank.AccountDO;
  5. import com.yihu.jw.entity.health.bank.ActivityDO;
  6. import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
  7. import org.springframework.data.jpa.repository.Query;
  8. import org.springframework.data.repository.PagingAndSortingRepository;
  9. import java.util.List;
  10. /**
  11. * @author wangzhinan
  12. * @create 2018-05-10 11:15
  13. * @desc health bank account dict
  14. **/
  15. public interface AccountDao extends PagingAndSortingRepository<AccountDO,String>,JpaSpecificationExecutor<AccountDO> {
  16. @Query("select t from AccountDO t where t.patientId=?1 and t.status=1")
  17. AccountDO selectByPatientId(String patientId);
  18. @Query("select t from AccountDO t where t.patientId=?1 and t.status=1")
  19. List<AccountDO> selectsByPatientId(String patientId);
  20. @Query("select t from AccountDO t where t.patientId=?1")
  21. List<AccountDO> findByPatientId(String patientId);
  22. }