@author Exrickx
| 14 | * @author Exrickx |
| 15 | */ |
| 16 | public interface PayDao extends JpaRepository<Pay,String>, JpaSpecificationExecutor<Pay> { |
| 17 | |
| 18 | List<Pay> getByStateIs(Integer state); |
| 19 | |
| 20 | @Query(value = "select sum(money) from t_pay where state = 1",nativeQuery = true) |
| 21 | BigDecimal countAllMoney(); |
| 22 | |
| 23 | @Query(value = "select sum(money) from t_pay where state = 1 and pay_type = ?1",nativeQuery = true) |
| 24 | BigDecimal countAllMoneyByType(String payType); |
| 25 | |
| 26 | @Query(value = "select sum(money) from t_pay where state = 1 and create_time between ?1 and ?2",nativeQuery = true) |
| 27 | BigDecimal countMoney(Date date1, Date date2); |
| 28 | |
| 29 | @Query(value = "select sum(money) from t_pay where state = 1 and pay_type = ?1 and create_time between ?2 and ?3",nativeQuery = true) |
| 30 | BigDecimal countMoneyByType(String payType, Date date1, Date date2); |
| 31 | } |
no outgoing calls
no test coverage detected