From 2c544f725be14999fc96f06ac65d71ec6beef7ac Mon Sep 17 00:00:00 2001
From: blackjoker <345002163@qq.com>
Date: Tue, 24 Oct 2023 19:04:53 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../com/jqtx/windows/command/CreditSubmitCommand.java |  8 ++++++++
 .../com/jqtx/windows/command/LoanSubmitCommand.java   |  6 +-----
 .../jqtx/windows/command/RiskQueryDataCommand.java    | 11 +++++++++++
 3 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 src/main/java/com/jqtx/windows/command/RiskQueryDataCommand.java

diff --git a/src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java b/src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java
index a5ce68b..a846fa6 100644
--- a/src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java
+++ b/src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java
@@ -9,6 +9,7 @@ import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.jqtx.infrastructure.oss.starter.config.OssUtils;
 import com.jqtx.infrastructure.oss.starter.properties.OssProperties;
 import com.jqtx.infrastructure.util.LoanMobileAESUtil;
@@ -16,6 +17,7 @@ import com.jqtx.infrastructure.util.StringUtil;
 import com.jqtx.windows.common.exception.BizException;
 import com.jqtx.windows.common.factory.AbstractCommand;
 import com.jqtx.windows.common.factory.RuntimeContextHolder;
+import com.jqtx.windows.common.mq.WindowsProducer;
 import com.jqtx.windows.component.CreditComponent;
 import com.jqtx.windows.component.enums.ZNEduEnum;
 import com.jqtx.windows.component.enums.ZNInComeEnum;
@@ -57,10 +59,16 @@ public class CreditSubmitCommand extends AbstractCommand {
     @Autowired
     private IWakandaFeignService iWakandaFeignService;
 
+    @Autowired
+    private WindowsProducer windowsProducer;
+
     @Override
     public JsonResult execute() {
         String requestBody = RuntimeContextHolder.currentRuntimeContext().getRequestBody();
         CreditSubmitRequest request = JSON.parseObject(requestBody, CreditSubmitRequest.class);
+        JSONObject thirdDataReq=new JSONObject();
+        thirdDataReq.put("orderNO",request.getOrderNo());
+        windowsProducer.pullCreditThirdData(thirdDataReq);
         CreditModel order = creditComponent.getByOrderNo(request.getOrderNo());
         if (ObjectUtil.isNotNull(order)) {
             return JsonResult.success();
diff --git a/src/main/java/com/jqtx/windows/command/LoanSubmitCommand.java b/src/main/java/com/jqtx/windows/command/LoanSubmitCommand.java
index bd326b5..80505d8 100644
--- a/src/main/java/com/jqtx/windows/command/LoanSubmitCommand.java
+++ b/src/main/java/com/jqtx/windows/command/LoanSubmitCommand.java
@@ -38,8 +38,6 @@ public class LoanSubmitCommand extends AbstractCommand {
     @Autowired
     private IWakandaFeignService wakandaFeignService;
 
-    @Autowired
-    private WindowsProducer windowsProducer;
 
     @Override
     public JsonResult execute() {
@@ -64,9 +62,7 @@ public class LoanSubmitCommand extends AbstractCommand {
         if (!insert) {
             throw new BizException(ExceptionCodeEnum.SYSTEM_SQL_INSERT_ERROR);
         }
-        JSONObject thirdDataReq=new JSONObject();
-        thirdDataReq.put("orderNO",loanSubmitResponse.getOrderNo());
-        windowsProducer.pullCreditThirdData(thirdDataReq);
+
 
         // 提现授信
         LoanCreditSubmitModel model = new LoanCreditSubmitModel();
diff --git a/src/main/java/com/jqtx/windows/command/RiskQueryDataCommand.java b/src/main/java/com/jqtx/windows/command/RiskQueryDataCommand.java
new file mode 100644
index 0000000..5d58eae
--- /dev/null
+++ b/src/main/java/com/jqtx/windows/command/RiskQueryDataCommand.java
@@ -0,0 +1,11 @@
+package com.jqtx.windows.command;
+
+import com.jqtx.windows.common.factory.AbstractCommand;
+import com.jqtx.windows.web.response.JsonResult;
+
+public class RiskQueryDataCommand extends AbstractCommand {
+    @Override
+    public JsonResult execute() {
+        return null;
+    }
+}
-- 
2.18.1