Commit 66ba22e0 by kangxiaoshan

1

parent 5b38e7ab
...@@ -21,7 +21,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -21,7 +21,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select count(*) from contract where email = ?1 and platform = ?2", nativeQuery = true) @Query(value = "select count(*) from contract where email = ?1 and platform = ?2", nativeQuery = true)
BigInteger countNumByEmail(String email, String platfrom); BigInteger countNumByEmail(String email, String platfrom);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDs(String startDate, String endDate, String platfrom); List<Contract> findByDs(String startDate, String endDate, String platfrom);
@Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and create_account in ?4 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and create_account in ?4 and status!='del' order by ds desc", nativeQuery = true)
...@@ -60,7 +60,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -60,7 +60,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select * from contract where platform = ?1 and contract_code = ?2", nativeQuery = true) @Query(value = "select * from contract where platform = ?1 and contract_code = ?2", nativeQuery = true)
Contract findByCodePlatform(String contractCode, String platform); Contract findByCodePlatform(String contractCode, String platform);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and id in ?4 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and id in ?4 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDsRelation(String startDate, String endDate, List<String> platform, List<String> contractIds); List<Contract> findByDsRelation(String startDate, String endDate, List<String> platform, List<String> contractIds);
@Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and create_account in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and create_account in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true)
...@@ -84,16 +84,16 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -84,16 +84,16 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value = "select * from contract where contract_code =?2 and platform = ?1 ", nativeQuery = true) @Query(value = "select * from contract where contract_code =?2 and platform = ?1 ", nativeQuery = true)
Contract findOneByCode(String platform, String contractId); Contract findOneByCode(String platform, String contractId);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and my_body_code in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and my_body_code in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDsContractBody(String startDate, String endDate, List<String> platforms, List bodyids, List<String> ids); List<Contract> findByDsContractBody(String startDate, String endDate, List<String> platforms, List bodyids, List<String> ids);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and my_body_code in ?4 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and my_body_code in ?4 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDsContractBody(String startDate, String endDate, String platform, List bodyids); List<Contract> findByDsContractBody(String startDate, String endDate, String platform, List bodyids);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform = ?3 and sale in ?4 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform = ?3 and sale in ?4 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDsContractSalse(String startDate, String endDate, String platform, List salseid); List<Contract> findByDsContractSalse(String startDate, String endDate, String platform, List salseid);
@Query(value = "select * from contract where ((start_date <= ?1 and end_date >= ?1) or (start_date <= ?2 and end_date >= ?2) or (start_date >= ?1 and end_date <= ?2) or (start_date <= ?1 and end_date >= ?2)) and platform in ?3 and sale in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true) @Query(value = "select * from contract where start_date >= ?1 and start_date <= ?2 and platform in ?3 and sale in ?4 and id in ?5 and status!='del' order by ds desc", nativeQuery = true)
List<Contract> findByDsContractSalse(String startDate, String endDate, List<String> platforms, List salseid, List<String> ids); List<Contract> findByDsContractSalse(String startDate, String endDate, List<String> platforms, List salseid, List<String> ids);
@Query(value = "select contract_code,my_body_code,sale,platform from contract where contract_code in ?1", nativeQuery = true) @Query(value = "select contract_code,my_body_code,sale,platform from contract where contract_code in ?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