Commit 3a5305b0 authored by shangying's avatar shangying

兼容方法

parent 68edf39c
......@@ -29,9 +29,16 @@ public interface OneClickDataRespository extends JpaRepository<OneClickData, Lon
// 通过订单号查看
@Query(value = "select * from one_click_data where order_no = ?1 OR channel_order_no= ?1 order by id desc limit 1", nativeQuery = true)
@Query(value = "select * from one_click_data where order_no = ?1 order by id desc limit 1", nativeQuery = true)
OneClickData findByOrderNo(String OrderNo);
// 通过订单号 渠道订单id号查看
@Query(value = "select * from one_click_data where order_no = ?1 OR channel_order_no= ?1 order by id desc limit 1", nativeQuery = true)
OneClickData findByOrderNoOrChannelOrderNo(String OrderNo);
// 通过放款号查看
@Query(value = "select * from one_click_data where loan_id = ?1 order by id desc limit 1", nativeQuery = true)
OneClickData findByLoanId(String loanId);
......
......@@ -69,5 +69,5 @@ public interface LoanOperationService {
* */
JSONObject fundsPlanLoanApply(OneClickData oneClickData,String payStatus);
LoanApplicationHistory selectLoanIdOrUserId(Long id);
}
......@@ -274,4 +274,12 @@ public class LoanOperationServiceImpl implements LoanOperationService{
public LoanApplicationHistory selectLoanId(Long id){
return loanApplicationHistoryRepository.findById(id);
}
/**
* 根据id或者userid查看表中的放款单
* */
@Override
public LoanApplicationHistory selectLoanIdOrUserId(Long id){
return loanApplicationHistoryRepository.findByIdOrUserId(id);
}
}
......@@ -50,7 +50,7 @@ public class OneClickDataQueueOperateServiceImpl implements OneClickDataQueueOpe
String extraData=queueMsgJson.get("extraData").toString();
String noticeType=queueMsgJson.get("noticeType").toString().trim();
log.info("获取data:{},applyNo:{}",data,applyNo);
OneClickData oneClickData= oneClickDataRespository.findByOrderNo(applyNo);
OneClickData oneClickData= oneClickDataRespository.findByOrderNoOrChannelOrderNo(applyNo);
log.info("获取oneClickData:{},获取noticeType:{}",oneClickData,noticeType);
if(Objects.isNull(oneClickData)){
}else{
......
......@@ -16,6 +16,9 @@ public interface LoanApplicationHistoryRepository extends CrudRepository<LoanApp
LoanApplicationHistory findById(Long id);
@Query(value = "select * from loan_application_history where id=?1 or user_id= ?1 order by id desc limit 1", nativeQuery = true)
LoanApplicationHistory findByIdOrUserId(Long id);
@Query(value = "select * from loan_application_history where user_id= ?1 and business_type= ?2 and is_active= 1 order by id desc limit 1", nativeQuery = true)
LoanApplicationHistory findByUserIdAndBusinessTypeAndIsActive(Long userId,Integer businessType);
}
\ No newline at end of file
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