Commit 983bab95 authored by 黎博's avatar 黎博

新增vcc造数据

parent f5930dd2
...@@ -16,8 +16,8 @@ public class GenVccController { ...@@ -16,8 +16,8 @@ public class GenVccController {
VccDataService vccDataService; VccDataService vccDataService;
@PostMapping("/gen") @PostMapping("/gen")
public JsonResult genVccUser(String namespace, String phoneNo, String channel) throws Exception { public JsonResult genVccUser(String namespace, String phoneNo, String channel, Integer status) throws Exception {
GenVccUser result = vccDataService.makeVccUser(namespace, phoneNo, channel, 0); GenVccUser result = vccDataService.makeVccUser(namespace, phoneNo, channel, status);
return JsonResult.success(result); return JsonResult.success(result);
} }
} }
...@@ -11,20 +11,22 @@ public class GenVccUser { ...@@ -11,20 +11,22 @@ public class GenVccUser {
*/ */
private String phoneNo; private String phoneNo;
/** /**
* uuid * 开通的渠道
*/ */
private String uuid; private String openedChannel;
/** /**
* 开通的渠道 * 开通状态
* 0-授信通过,
*/ */
private Long openedChannel; private Integer status;
/** /**
* 创建日期 * 额度
*/ */
private Date createdAt; private String amount;
/** /**
* 开通状态 * 卡号
* 0-授信通过
*/ */
private Integer status; private String eacctNo;
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,8 +12,19 @@ import java.util.Map; ...@@ -12,8 +12,19 @@ import java.util.Map;
@Service @Service
public class VccDataServiceImpl implements VccDataService { public class VccDataServiceImpl implements VccDataService {
/**
* @param namespace
* @param phoneNo
* @param openedChannel
* @param status 0-未激活,1-已激活
* @return
* @throws Exception
*/
@Override @Override
public GenVccUser makeVccUser(String namespace, String phoneNo, String openedChannel, Integer status) throws Exception { public GenVccUser makeVccUser(String namespace, String phoneNo, String openedChannel, Integer status) throws Exception {
GenVccUser genVccUser = new GenVccUser();
genVccUser.setPhoneNo(phoneNo);
genVccUser.setOpenedChannel(openedChannel);
String vccChannel = null; String vccChannel = null;
if (openedChannel.equals("214")) { if (openedChannel.equals("214")) {
vccChannel = "159904"; vccChannel = "159904";
...@@ -28,11 +39,11 @@ public class VccDataServiceImpl implements VccDataService { ...@@ -28,11 +39,11 @@ public class VccDataServiceImpl implements VccDataService {
String token = loginResult.get("token").toString(); String token = loginResult.get("token").toString();
String uuid = loginResult.get("uuid").toString(); String uuid = loginResult.get("uuid").toString();
// credit url // credit url
String vccToken = Vcc.creditUrl(namespace, token, vccChannel, vccChannel); String vccToken = Vcc.creditUrl(namespace, token, vccChannel);
// 身份证正面 // 身份证正面
Vcc.uploadFrontIdCard(vccToken, uuid); Vcc.uploadFrontIdCard(vccToken, uuid, vccChannel);
// 身份证反面 // 身份证反面
Vcc.uploadBackIdCard(vccToken, uuid); Vcc.uploadBackIdCard(vccToken, uuid, vccChannel);
// 放置身份证重复 // 放置身份证重复
Vcc.modifyExistIdNo(namespace); Vcc.modifyExistIdNo(namespace);
// talos保存用户信息 // talos保存用户信息
...@@ -43,16 +54,26 @@ public class VccDataServiceImpl implements VccDataService { ...@@ -43,16 +54,26 @@ public class VccDataServiceImpl implements VccDataService {
Vcc.submitCredit(namespace, token, vccChannel); Vcc.submitCredit(namespace, token, vccChannel);
// 授信结果查询 // 授信结果查询
Vcc.searchCreditResult(namespace, token, vccChannel); Vcc.searchCreditResult(namespace, token, vccChannel);
// 人脸识别回调 if (status == 0) {
Vcc.appFaceCallback(namespace, token, vccChannel); return genVccUser;
// 基本信息 }
Vcc.basicInfo(namespace, token, vccChannel); if (status == 1) {
// 发送验证码 // 人脸识别回调
String requestId = Vcc.bindCardSms(namespace, token, vccChannel, "ABC", "6228272537046278993"); Vcc.appFaceCallback(namespace, token, vccChannel);
// 额度激活 // 基本信息
Vcc.quotaActivation(namespace, token, vccChannel, "6228272537046278993", requestId); Vcc.basicInfo(namespace, token, vccChannel);
// 开户结果 // 发送验证码
JSONObject result = Vcc.openResult(namespace, token, vccChannel); String requestId = Vcc.bindCardSms(namespace, token, vccChannel, "ABC", "6228272537046278993");
return null; // 额度激活
Vcc.quotaActivation(namespace, token, vccChannel, "6228272537046278993", requestId);
// 开户结果
JSONObject result = Vcc.openResult(namespace, token, vccChannel);
Map data = (Map) result.get("data");
String amount = data.get("amount").toString();
String eacctNo = data.get("eacctNo").toString();
genVccUser.setAmount(amount);
genVccUser.setEacctNo(eacctNo);
}
return genVccUser;
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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