Commit 479589a0 authored by 张庆's avatar 张庆

新增MQ

parent 6216b6dd
......@@ -59,17 +59,10 @@ public class CreditSubmitCommand extends AbstractCommand {
if (ObjectUtil.isNotNull(order)) {
return JsonResult.success();
}
CreditModel creditModel = new CreditModel();
creditModel.setOrderNo(request.getOrderNo());
creditComponent.insert(creditModel);
windowsProducer.pullCrditDate(request);
// CreditModel creditModel = new CreditModel();
// creditModel.setOrderNo(request.getOrderNo());
// this.convert(request, creditModel);
// ClientInfoModel infoModel = this.convertCredit(request, creditModel);
// JsonResult result = iWakandaFeignService.clientCredit(infoModel);
// result.apiCheck();
// creditComponent.insert(creditModel);
// JSONObject thirdDataReq=new JSONObject();
// thirdDataReq.put("orderNo",request.getOrderNo());
// windowsProducer.pullCreditThirdData(thirdDataReq);
return JsonResult.success();
}
}
......@@ -52,19 +52,17 @@ public class CreditListener extends AbstractMQConsumerHandler<CreditSubmitReques
@Override
public void run(CreditSubmitRequest request) throws Exception {
CreditModel order = creditComponent.getByOrderNo(request.getOrderNo());
if (ObjectUtil.isNotNull(order)) {
return;
CreditModel creditModel = creditComponent.getByOrderNo(request.getOrderNo());
if (ObjectUtil.isNull(creditModel)) {
throw new RuntimeException("消息重试");
}
CreditModel creditModel = new CreditModel();
creditModel.setOrderNo(request.getOrderNo());
this.convert(request, creditModel);
ClientInfoModel infoModel = this.convertCredit(request, creditModel);
JsonResult result = iWakandaFeignService.clientCredit(infoModel);
result.apiCheck();
creditComponent.insert(creditModel);
JSONObject thirdDataReq=new JSONObject();
thirdDataReq.put("orderNo",request.getOrderNo());
creditComponent.updateByOrderNo(request.getOrderNo(), creditModel);
JSONObject thirdDataReq = new JSONObject();
thirdDataReq.put("orderNo", request.getOrderNo());
windowsProducer.pullCreditThirdData(thirdDataReq);
}
......
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