Commit 65a86141 authored by liwenbin's avatar liwenbin

fix

parent 60a4cfbc
...@@ -69,7 +69,7 @@ public class AssetDistributeRecordServiceImpl implements IAssetDistributeRecordS ...@@ -69,7 +69,7 @@ public class AssetDistributeRecordServiceImpl implements IAssetDistributeRecordS
public void updateAssetDistributeStatus(String bizNo, int status) { public void updateAssetDistributeStatus(String bizNo, int status) {
AssetDistributeRecord assetDistributeRecord = assetDistributeRecordRepository.findByBizNoOrderByCreatedAtDescLimitOne(bizNo); AssetDistributeRecord assetDistributeRecord = assetDistributeRecordRepository.findByBizNoOrderByCreatedAtDescLimitOne(bizNo);
if (assetDistributeRecord == null) { if (assetDistributeRecord == null) {
// log.info("资产分发记录更改状态未找到订单, bizNo : {}, status : {}", bizNo, status); log.info("资产分发记录更改状态未找到订单, bizNo : {}, status : {}", bizNo, status);
// throw new QGException(QGExceptionType.NOT_FOUND_FUND_SERVER_RESULT_BIZNO, bizNo, status); // throw new QGException(QGExceptionType.NOT_FOUND_FUND_SERVER_RESULT_BIZNO, bizNo, status);
} else { } else {
assetDistributeRecord.setAssetDistributeStatus(status); assetDistributeRecord.setAssetDistributeStatus(status);
......
...@@ -194,6 +194,8 @@ public class AssetDistributeServiceImpl implements IAssetDistributeService{ ...@@ -194,6 +194,8 @@ public class AssetDistributeServiceImpl implements IAssetDistributeService{
public void receiveFundingResult(String bizNo, FundingResult fundingResult) { public void receiveFundingResult(String bizNo, FundingResult fundingResult) {
try { try {
// 1、更改分配记录状态 // 1、更改分配记录状态
// 延迟10秒再去更改,避免分发记录还没创建,结果就来了
TimeUnit.SECONDS.sleep(10);
assetDistributeRecordService.updateAssetDistributeStatus(bizNo, fundingResult == FundingResult.FUAD_ASSIGN_SUCC ? StatusConstants.SUCCESS : StatusConstants.FAIL); assetDistributeRecordService.updateAssetDistributeStatus(bizNo, fundingResult == FundingResult.FUAD_ASSIGN_SUCC ? StatusConstants.SUCCESS : StatusConstants.FAIL);
// 2、重新进行分发, 目前还没有,等接了助贷资金路由以后再增加 // 2、重新进行分发, 目前还没有,等接了助贷资金路由以后再增加
} catch (QGException qe) { } catch (QGException qe) {
......
...@@ -16,6 +16,6 @@ public interface IAssetDistributeRecordRepository extends JpaRepository<AssetDis ...@@ -16,6 +16,6 @@ public interface IAssetDistributeRecordRepository extends JpaRepository<AssetDis
public List<AssetDistributeRecord> findByAssetNo(String assetNo); public List<AssetDistributeRecord> findByAssetNo(String assetNo);
@Query(value = "select * from asset_distribute_record where biz_no = ?1 and asset_distribute_status = 2 order by created_at desc limit 1", nativeQuery = true) @Query(value = "select * from asset_distribute_record where biz_no = ?1 order by created_at desc limit 1", nativeQuery = true)
public AssetDistributeRecord findByBizNoOrderByCreatedAtDescLimitOne(String bizNo); public AssetDistributeRecord findByBizNoOrderByCreatedAtDescLimitOne(String bizNo);
} }
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