PaymentRepository.java 776 Bytes
Newer Older
manxiaoqiang committed
1 2 3
package common.repository;

import common.model.Auth;
4
import common.model.BackVisit;
manxiaoqiang committed
5 6
import common.model.Payment;
import org.springframework.data.jpa.repository.JpaRepository;
7
import org.springframework.data.jpa.repository.Query;
manxiaoqiang committed
8 9
import org.springframework.transaction.annotation.Transactional;

10 11
import java.util.List;

manxiaoqiang committed
12 13 14
@Transactional
public interface PaymentRepository extends JpaRepository<Payment, Long> {

15
    @Query(value = "select * from payment where account_id  = ?1 and ds >= ?2 and ds <= ?3 and platform = ?4", nativeQuery = true)
16
    List<Payment> findAll(Long accountId, String startDate, String endDate, String platform);
17 18 19

    @Query(value = "select * from payment where platform = ?1", nativeQuery = true)
    List<Payment> findAllByPlatform(String platform);
manxiaoqiang committed
20
}