Commit 3de1cc33 authored by shangying's avatar shangying

二次风控接口不ok

parent 833c5326
......@@ -6,6 +6,7 @@ import cn.quantgroup.cashloanflowboss.api.oneclickdata.model.ResposeResultEnum;
import cn.quantgroup.cashloanflowboss.api.oneclickdata.repository.OneClickDataRespository;
import cn.quantgroup.cashloanflowboss.api.oneclickdata.service.FundsAllocationplanService;
import cn.quantgroup.cashloanflowboss.api.oneclickdata.service.LoanOperationService;
import cn.quantgroup.cashloanflowboss.api.oneclickdata.service.PhoneInfoService;
import cn.quantgroup.cashloanflowboss.core.base.Result;
import cn.quantgroup.cashloanflowboss.spi.clf.model.LoanProgress;
import cn.quantgroup.cashloanflowboss.spi.xyqb.entity.LoanApplicationHistory;
......@@ -43,6 +44,8 @@ public class LoanOperationServiceImpl implements LoanOperationService{
private LoanOperationService loanOperationService;
@Autowired
private FundsAllocationplanService fundsAllocationplanService;
@Autowired
private PhoneInfoService phoneInfoService;
@Value("${opapi.http.net}")
private String opapiHttp;
@Value("${clotho.http.net}")
......@@ -77,7 +80,14 @@ public class LoanOperationServiceImpl implements LoanOperationService{
paras.put("deadLine", "1548518400");
Map<String, String> header =new HashMap<String, String>();
header.put("Content-Type", "application/x-www-form-urlencoded");
header.put("x-auth-token", oneClickData.getToken());
String token="";
try {
token=phoneInfoService.getToken(oneClickData.getPhone(), oneClickData.getChannelCode());
}catch (Exception e){
log.info("获取token进入异常={}",e);
}
header.put("x-auth-token",token);
log.info("打印当前的二次风控paras={},header={},url={}",paras,header,url);
JSONObject result= HttpRequest.doPostReturnResponseJson(url, paras, header);
......@@ -87,10 +97,12 @@ public class LoanOperationServiceImpl implements LoanOperationService{
@Override
public boolean updatContractStatus(OneClickData oneClickData) {
boolean boo=true;
log.info("合同idOneClickData={}",oneClickData);
int num=xyqbCenterService.updateContractStatus(Long.valueOf(oneClickData.getUserId()),2,Long.valueOf(oneClickData.getLoanId()));
if(num>0){
log.info("修改合同成功");
}else{
log.info("修改合同失败");
boo=false;
}
......
......@@ -19,7 +19,7 @@ public class SelectCreditStatusJobNew {
oneClickDataOperateJobService.excuteSelectCreditStatusJob();
}
@Scheduled(cron = "0 0/1 * * * ?")
@Scheduled(cron = "0 0/2 * * * ?")
public void executeFund() {
System.out.print("状态是21尚未成功放款的到哪");
oneClickDataOperateJobService.excuteFundJob();
......
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