@Query(value="update loan_application_history apphis set apphis.is_active=0, apphis.progress = 12 where apphis.id =?1 and apphis.progress = 24",nativeQuery=true)
voidcloseOverdueData(Longid);
@Query(value="select * from loan_application_history where user_id = ?1 and id = ?2",nativeQuery=true)
@Query(value="select * from loan_application_history where user_id = ?1 and id < 101637467 and progress in (15,16) and business_type = 0",nativeQuery=true)
@Query("select new XyqbLoanApplicationManifestHistory(userId, max(loanApplicationHistoryId)) from XyqbLoanApplicationManifestHistory where userId in ?1 and channelId in ?2 and createdAt >= ?3 group by userId, channelId")
@Query(value="select * from loan_application_manifest_history where funding_corp_id = ?1 and transaction_status= 1 and loan_paid_at between ?2 and ?3",nativeQuery=true)
@Query(value="select * from loan_application_manifest_history where funding_corp_id = ?1 and transaction_status= 2 and loan_paid_at between ?2 and ?3",nativeQuery=true)
@Query(value="select COUNT(m.id) from loan_application_manifest_history m JOIN loan_application_history l on m.loan_application_history_id = l.id where l.user_id = ?1 and m.funding_corp_id = ?2 AND l.`is_active` = 1",nativeQuery=true)
@Query(value="select * from loan_application_manifest_history where funding_corp_id in (780,770) and transaction_status in (2,5) and DATE(loan_paid_at) = ?1",nativeQuery=true)
@Query(value="select * from loan_application_manifest_history where (user_id = ?1 or loan_application_history_id = ?2) and transaction_status in (0,1,4)",nativeQuery=true)