Commit 13cfbe6b authored by BlackJokerCJ's avatar BlackJokerCJ

修改提交

parent 3a821faa
......@@ -2,6 +2,7 @@ package com.jqtx.windows.command;
import cn.hutool.core.lang.Assert;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jqtx.windows.common.exception.BizException;
import com.jqtx.windows.common.factory.AbstractCommand;
import com.jqtx.windows.common.factory.RuntimeContextHolder;
......@@ -63,7 +64,9 @@ public class LoanSubmitCommand extends AbstractCommand {
if (!insert) {
throw new BizException(ExceptionCodeEnum.SYSTEM_SQL_INSERT_ERROR);
}
windowsProducer.pullCreditThirdData(loanSubmitResponse.getOrderNo());
JSONObject thirdDataReq=new JSONObject();
thirdDataReq.put("orderNO",loanSubmitResponse.getOrderNo());
windowsProducer.pullCreditThirdData(thirdDataReq);
// 提现授信
LoanCreditSubmitModel model = new LoanCreditSubmitModel();
......
......@@ -25,7 +25,7 @@ import java.time.LocalDateTime;
*/
@Slf4j
@MQConsumerComponent(tags = "creditThirdData", topic = "$mq.creditTopic")
public class CreditThirdDataListener extends AbstractMQConsumerHandler<String> {
public class CreditThirdDataListener extends AbstractMQConsumerHandler<JSONObject> {
@Autowired
private LoanComponent loanComponent;
......@@ -38,18 +38,18 @@ public class CreditThirdDataListener extends AbstractMQConsumerHandler<String> {
@Override
public Class getClazz() {
return String.class;
return JSONObject.class;
}
@Override
public void run(String orderNo) throws Exception {
public void run(JSONObject req) throws Exception {
JSONObject thirdCredit = new JSONObject();
thirdCredit.put("reqNo", orderNo);
thirdCredit.put("reqNo", req.getString("orderNo"));
thirdCredit.put("type", "01");
abcHttpClient.postRequest(thirdCredit.toJSONString(), ZNPostUrlEnum.CREDIT_APPLY.getCode());
CreditModel creditModel1=new CreditModel();
creditModel1.setCreditThirdStatus("INIT");
creditComponent.updateByOrderNo(orderNo,creditModel1);
creditComponent.updateByOrderNo(req.getString("orderNo"),creditModel1);
}
}
package com.jqtx.windows.common.mq;
import com.alibaba.fastjson.JSONObject;
import com.jqtx.infrastructure.mq.starter.mq.MQProducer;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
......@@ -28,8 +29,8 @@ public class WindowsProducer {
publishData(null, json, creditTopic, "firstCredit");
}
public void pullCreditThirdData(String json) {
publishData(null, json, creditTopic, "creditThirdData");
public void pullCreditThirdData(JSONObject json) {
publishData(null, json.toJSONString(), creditTopic, "creditThirdData");
}
......
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