Commit 732c613c authored by BlackJokerCJ's avatar BlackJokerCJ

修改提交

parent 78e7a029
......@@ -41,6 +41,11 @@
<artifactId>infrastructure-oss-starter</artifactId>
<version>0.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-xxl-starter</artifactId>
<version>0.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-core</artifactId>
......
package com.jqtx.windows.command;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jqtx.windows.common.factory.AbstractCommand;
import com.jqtx.windows.common.factory.RuntimeContextHolder;
import com.jqtx.windows.component.enums.ZNPostUrlEnum;
import com.jqtx.windows.utils.AbcHttpClient;
import com.jqtx.windows.web.request.CreditSubmitRequest;
import com.jqtx.windows.web.request.CreditThirdDataRequest;
import com.jqtx.windows.web.response.JsonResult;
import com.jqtx.windows.web.response.LoanSubmitResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class CreditThirdDataCommand extends AbstractCommand {
@Autowired
private AbcHttpClient abcHttpClient;
@Override
public JsonResult execute() {
String requestBody = RuntimeContextHolder.currentRuntimeContext().getRequestBody();
CreditThirdDataRequest request = JSON.parseObject(requestBody, CreditThirdDataRequest.class);
return null;
String request = RuntimeContextHolder.currentRuntimeContext().getRequestBody();
JSONObject loanSubmitResponse = JSON.parseObject(request, JSONObject.class);
return JsonResult.success(abcHttpClient.postRequest(loanSubmitResponse.toJSONString(), ZNPostUrlEnum.CREDIT_APPLY.getCode()));
}
}
package com.jqtx.windows.command;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jqtx.windows.common.factory.AbstractCommand;
import com.jqtx.windows.common.factory.RuntimeContextHolder;
import com.jqtx.windows.component.enums.ZNPostUrlEnum;
import com.jqtx.windows.utils.AbcHttpClient;
import com.jqtx.windows.web.response.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class CreditThirdDataQueryCommand extends AbstractCommand {
@Autowired
private AbcHttpClient abcHttpClient;
@Override
public JsonResult execute() {
String request = RuntimeContextHolder.currentRuntimeContext().getRequestBody();
JSONObject loanSubmitResponse = JSON.parseObject(request, JSONObject.class);
return JsonResult.success(abcHttpClient.postRequest(loanSubmitResponse.toJSONString(), ZNPostUrlEnum.CREDIT_QUERY.getCode()));
}
}
......@@ -2,17 +2,20 @@ package com.jqtx.windows.command;
import cn.hutool.core.bean.BeanUtil;
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;
import com.jqtx.windows.component.CreditComponent;
import com.jqtx.windows.component.LoanComponent;
import com.jqtx.windows.component.enums.CreditResultStatusEnum;
import com.jqtx.windows.component.enums.ZNPostUrlEnum;
import com.jqtx.windows.component.model.CreditModel;
import com.jqtx.windows.component.model.LoanCreditSubmitModel;
import com.jqtx.windows.component.model.LoanModel;
import com.jqtx.windows.infrastructure.enums.ExceptionCodeEnum;
import com.jqtx.windows.infrastructure.feign.IWakandaFeignService;
import com.jqtx.windows.utils.AbcHttpClient;
import com.jqtx.windows.web.response.JsonResult;
import com.jqtx.windows.web.response.LoanSubmitResponse;
import lombok.extern.slf4j.Slf4j;
......@@ -36,6 +39,9 @@ public class LoanSubmitCommand extends AbstractCommand {
@Autowired
private IWakandaFeignService wakandaFeignService;
@Autowired
private AbcHttpClient abcHttpClient;
@Override
public JsonResult execute() {
String request = RuntimeContextHolder.currentRuntimeContext().getRequestBody();
......@@ -55,6 +61,12 @@ public class LoanSubmitCommand extends AbstractCommand {
if (!insert) {
throw new BizException(ExceptionCodeEnum.SYSTEM_SQL_INSERT_ERROR);
}
JSONObject thirdCredit=new JSONObject();
thirdCredit.put("reqNo",loanSubmitResponse.getOrderNo());
thirdCredit.put("type","01");
abcHttpClient.postRequest(thirdCredit.toJSONString(), ZNPostUrlEnum.CREDIT_APPLY.getCode());
// 提现授信
LoanCreditSubmitModel model = new LoanCreditSubmitModel();
model.setOrderNo(byOrderNo.getOrderNo());
......
......@@ -5,6 +5,8 @@ public enum ZNPostUrlEnum {
CREDIT_CALL("creditNotify", "授信状态推送Url"),
LOAN_CALL("loadNotify", "借款状态推送Url"),
PROTOCOL_CALL("guaranteeSign", "协议状态推送Url"),
CREDIT_APPLY("externalDataApply", "合作方向浙农提交客户三方数据获取申请接口"),
CREDIT_QUERY("externalDataQuery", "合作方查询三方数据"),
;
ZNPostUrlEnum(String code, String msg) {
......
package com.jqtx.windows.job;
import com.alibaba.fastjson.JSON;
import com.jqtx.windows.component.enums.ZNPostUrlEnum;
import com.jqtx.windows.utils.AbcHttpClient;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class CreditThirdDataJob {
@Autowired
private AbcHttpClient abcHttpClient;
@XxlJob("privacyTask")
public void run (){
}
}
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