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

新增vcc造数据

parent f5930dd2
......@@ -16,8 +16,8 @@ public class GenVccController {
VccDataService vccDataService;
@PostMapping("/gen")
public JsonResult genVccUser(String namespace, String phoneNo, String channel) throws Exception {
GenVccUser result = vccDataService.makeVccUser(namespace, phoneNo, channel, 0);
public JsonResult genVccUser(String namespace, String phoneNo, String channel, Integer status) throws Exception {
GenVccUser result = vccDataService.makeVccUser(namespace, phoneNo, channel, status);
return JsonResult.success(result);
}
}
......@@ -11,20 +11,22 @@ public class GenVccUser {
*/
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;
}
......@@ -12,8 +12,19 @@ import java.util.Map;
@Service
public class VccDataServiceImpl implements VccDataService {
/**
* @param namespace
* @param phoneNo
* @param openedChannel
* @param status 0-未激活,1-已激活
* @return
* @throws Exception
*/
@Override
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;
if (openedChannel.equals("214")) {
vccChannel = "159904";
......@@ -28,11 +39,11 @@ public class VccDataServiceImpl implements VccDataService {
String token = loginResult.get("token").toString();
String uuid = loginResult.get("uuid").toString();
// 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);
// talos保存用户信息
......@@ -43,16 +54,26 @@ public class VccDataServiceImpl implements VccDataService {
Vcc.submitCredit(namespace, token, vccChannel);
// 授信结果查询
Vcc.searchCreditResult(namespace, token, vccChannel);
// 人脸识别回调
Vcc.appFaceCallback(namespace, token, vccChannel);
// 基本信息
Vcc.basicInfo(namespace, token, vccChannel);
// 发送验证码
String requestId = Vcc.bindCardSms(namespace, token, vccChannel, "ABC", "6228272537046278993");
// 额度激活
Vcc.quotaActivation(namespace, token, vccChannel, "6228272537046278993", requestId);
// 开户结果
JSONObject result = Vcc.openResult(namespace, token, vccChannel);
return null;
if (status == 0) {
return genVccUser;
}
if (status == 1) {
// 人脸识别回调
Vcc.appFaceCallback(namespace, token, vccChannel);
// 基本信息
Vcc.basicInfo(namespace, token, vccChannel);
// 发送验证码
String requestId = Vcc.bindCardSms(namespace, token, vccChannel, "ABC", "6228272537046278993");
// 额度激活
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 diff is collapsed.
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