Commit 8c1d38a6 by manxiaoqiang

2

parent 181ab5ad
......@@ -33,7 +33,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and type = ?3",nativeQuery=true)
List<Contract> findByPlatformAndEmail(String platform, String email, String type);
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and type = ?3 order by ds desc limit 1",nativeQuery=true)
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and type = ?3 order by ds,end_date desc limit 1",nativeQuery=true)
Contract findByPlatformAndEmailLimit1(String platform, String email,String type);
@Query(value="SELECT * from contract where platform = ?1 and email = ?2 and type = ?3 and price_level = ?4 order by ds desc limit 1",nativeQuery=true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment