Commit f106ec05 authored by 黎博's avatar 黎博

更新

parent 701af9b6
......@@ -5,7 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 造Xyqb数据传递的参数实体类
* 造数据传递的参数实体类
*/
@Data
public class ApplyDataVo {
......@@ -27,8 +27,6 @@ public class ApplyDataVo {
private Integer term = 3;
private Integer rate;
private String name = "刘志国";
private String idCardNo = "330212198511195794";
......@@ -39,9 +37,11 @@ public class ApplyDataVo {
private String bankCode = "CCB";
private Integer fixedBillDay = 2;
private String rate = "31.86";
private String fixedBillDay = "2";
private Integer fixedRepayDay = 12;
private String fixedRepayDay = "12";
/**
* websocket通信标志位
*/
......
......@@ -78,10 +78,10 @@ public class Common {
JSONObject result = HttpClientUtils.doPost(url, "content=" + contentStr);
String response = LexinEncrypt.decryptAfterBase64Decode(result.get("content").toString(), AESKeywy);
if (!StringUtils.isEmpty(symbol)) {
WebSocketServer.sendInfo("提现参数为:" + contentStr, symbol);
WebSocketServer.sendInfo("提现结果为:" + contentStr, symbol);
WebSocketServer.sendInfo("提现参数为:" + content, symbol);
WebSocketServer.sendInfo("提现结果为:" + result, symbol);
}
log.info("提现后结果为:" + response);
log.info("提现后结果为:" + result);
return true;
}
......
......@@ -31,9 +31,9 @@ public class Lexin {
String idCardNo = applyDataVo.getIdCardNo();
Integer amount = applyDataVo.getAmount();
Integer term = applyDataVo.getTerm();
Integer rate = applyDataVo.getRate();
Integer fixedBillDay = applyDataVo.getFixedBillDay();
Integer fixedRepayDay = applyDataVo.getFixedRepayDay();
String rate = applyDataVo.getRate();
String fixedBillDay = applyDataVo.getFixedBillDay();
String fixedRepayDay = applyDataVo.getFixedRepayDay();
String symbol = applyDataVo.getSymbol();
String orderNo = "channel_order" + phoneNo + "_" + random.nextInt(9999);
......@@ -128,7 +128,7 @@ public class Lexin {
return authInfo;
}
public static Map<String, Object> createScenarioData(Integer amount, Integer term, Integer rate, Integer fixedBillDay, Integer fixedRepayDay) {
public static Map<String, Object> createScenarioData(Integer amount, Integer term, String rate, String fixedBillDay, String fixedRepayDay) {
Map<String, Object> scenarioData = new HashMap<>();
Map<String, Object> auditInfo = new HashMap<>();
Map<String, Object> extra = new HashMap<>();
......
......@@ -570,7 +570,7 @@ public class Xyqb {
Map data = (Map) result.get("data");
String opToken = data.get("token").toString();
if (symbol != null) {
WebSocketServer.sendInfo("登录OP,获取token:", symbol);
WebSocketServer.sendInfo("登录OP,获取token:" + opToken, symbol);
}
return opToken;
}
......
package cn.qg.qaplatform.service.impl;
import cn.qg.qaplatform.common.enums.ChannelEnum;
import cn.qg.qaplatform.config.WebSocketServer;
import cn.qg.qaplatform.domain.ApplyDataVo;
import cn.qg.qaplatform.process.Common;
import cn.qg.qaplatform.process.Lexin;
......@@ -9,7 +8,6 @@ import cn.qg.qaplatform.process.Xyqb;
import cn.qg.qaplatform.service.QueryInProcessStatusService;
import cn.qg.qaplatform.service.LexinDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
......@@ -42,12 +40,18 @@ public class LexinDataServiceImpl implements LexinDataService {
boolean fundAssignResult = Common.assignFundCorp(namespace, fundId);
// 进件
boolean createOrderResult = Lexin.createOrder(applyDataVo);
setUserStatusRedisValue(namespace, phoneNo, 0);
if (!createOrderResult) {
return false;
}
String token = Xyqb.login(namespace, 1, phoneNo);
Map userInfoResult = Xyqb.checkUserId(namespace, phoneNo);
String uuid = userInfoResult.get("uuid").toString();
String userId = userInfoResult.get("id").toString();
String channelOrderNo = Common.queryChannelOrderNoByPhone(namespace, phoneNo, ChannelEnum.LEXIN.getChannelId());
Common.channelOrderApprove(namespace, channelOrderNo, amount, "0", true, term);
// 风控授信回调
// Xyqb.creditAuthNotify(namespace, token, uuid, ChannelEnum.LEXIN.getChannelId(), fundId, channelOrderNo, 0, true, amount, term);
setUserStatusRedisValue(namespace, phoneNo, 0);
// 查询到资方分配成功才进行下一步
queryInProcessStatusService.queryFundingAssignProgress(namespace, phoneNo, fundId, symbol);
// api提现
......@@ -57,12 +61,9 @@ public class LexinDataServiceImpl implements LexinDataService {
}
setUserStatusRedisValue(namespace, phoneNo, 2);
// 二次风控
String token = Xyqb.login(namespace, 1, phoneNo);
Map userInfoResult = Xyqb.checkUserId(namespace, phoneNo);
String uuid = userInfoResult.get("uuid").toString();
String userId = userInfoResult.get("id").toString();
Integer loanId = Common.queryLoanId(namespace, phoneNo, ChannelEnum.LEXIN.getChannelId());
boolean secondWindControlResult = Xyqb.externalQuotaOrderAuditNotify(namespace, 1, token, uuid, loanId, 11, true);
Xyqb.modifyContactStatus(namespace, userId);
// 放款
String opToken = Xyqb.loginOP(namespace);
......@@ -74,7 +75,7 @@ public class LexinDataServiceImpl implements LexinDataService {
Xyqb.modifyWaitingFundingCreatedAt(namespace, loanId);
Thread.sleep(5000);
// 直接打款
Xyqb.fundsPlanLoanApply(namespace,opToken, fundId, money, people);
Xyqb.fundsPlanLoanApply(namespace, opToken, fundId, money, people);
Thread.sleep(30000);
// 放款结果通知
boolean makeLoanResult = Xyqb.payNotify(namespace, loanId, true);
......
......@@ -16,18 +16,18 @@ public class Lexin {
public static String MD5Keywy = "qEAxMJBv";
public static String AESKeywy = "sxD8KO79EDK0N0AJ";
public static String namespace = "pre";
public static String phoneNo = "13253223847";
public static String phoneNo = "18995803991";
public static String orderNo = "channel_order" + phoneNo + "_" + random.nextInt(9999);
public static String userName = "柯友安";
public static String idCardNo = "460202197905166525";
public static String userName = "陆康盛";
public static String idCardNo = "530827197906309549";
public static Integer amount = 10000;
public static Integer term = 3;
public static String rate = "31.86";
public static String fixedBillDay = "2";
public static String fixedRepayDay = "12";
public static String bankCardNo = "6228270172922504353";
public static String bankCode = "ABC";
public static String bankName = "中国农业银行";
public static String bankCardNo = "6217003252470844018";
public static String bankCode = "CCB";
public static String bankName = "中国建设银行";
/**
* 进件
......
......@@ -17,10 +17,10 @@ import java.util.List;
import java.util.Map;
public class Xyqb {
public static String namespace = "pre";
public static String namespace = "vcc2";
public static Integer channelId = 1;
public static Integer fundId = 1010;
public static String phone = "13039252170";
public static Integer fundId = 480;
public static String phone = "18300000120";
public static String token = "";
public static String uuid = "";
public static Long userId;
......@@ -33,10 +33,10 @@ public class Xyqb {
public static String orderNo = "";
public static Integer bizType = 0;
public static String auditResult = "true";
public static String creditAmount = "9600"; // 授信时返回的额度
public static Integer maxAmount = 9600; // 提现时的额度,
public static String creditAmount = "10000"; // 授信时返回的额度
public static Integer maxAmount = 10000; // 提现时的额度,
public static Integer minAmount = 1000; //
public static Integer term = 12;
public static Integer term = 6;
public static Long accountId;
public static String payToken = "";
public static String cardNo = "6228220000020362026";
......@@ -663,59 +663,59 @@ public class Xyqb {
public static void main(String[] args) throws Exception {
// 分配资金方
// loginFundOP();
// unblockLoan();
// boolean result = assignFundOrNot();
// if (!result) {
// setFundPlan();
// unblockLoan();
// }
//
// // 授信
// login();
// checkUserId();
// // 如果是云信,则需要插入银行卡
// if (fundId == 1040) {
// insertBankCardOfYunxing();
// }
// syncSessionToXyqb();
// creditSessionSync();
// realNameVerified();
// authBasicInfo();
// enterAuthOcr();
// uploadFrontOfIdCard();
// uploadBackOfIdCard();
// submitPhotoAuth();
// credit();
// submitAudit();
// queryUserAuditRecord();
// creditAuthNotify();
// Thread.sleep(180000);
// 绑卡提现
// login();
// checkUserId();
// syncSessionToXyqb();
// loginWithDrawPage();
// getUserAccountId();
// bindCard();
// cardAuthSms();
// cardAuthSmsConfirm();
// getBindCardList();
// createLoan();
// externalQuotaOrderAuditNotify();
// modifyContactStatus();
// Thread.sleep(10000);
//
// // 放款
// loginOP();
// checkWaitingFundingCorpOperatePeople();
// modifyWaitingFundingCreatedAt();
// Thread.sleep(10000);
// fundsPlanLoanApply();
// Thread.sleep(10000);
// payNotify();
// 分配资金方
loginFundOP();
unblockLoan();
boolean result = assignFundOrNot();
if (!result) {
setFundPlan();
unblockLoan();
}
// 授信
login();
checkUserId();
// 如果是云信,则需要插入银行卡
if (fundId == 1040) {
insertBankCardOfYunxing();
}
syncSessionToXyqb();
creditSessionSync();
realNameVerified();
authBasicInfo();
enterAuthOcr();
uploadFrontOfIdCard();
uploadBackOfIdCard();
submitPhotoAuth();
credit();
submitAudit();
queryUserAuditRecord();
creditAuthNotify();
Thread.sleep(180000);
// 绑卡提现
login();
checkUserId();
syncSessionToXyqb();
loginWithDrawPage();
getUserAccountId();
bindCard();
cardAuthSms();
cardAuthSmsConfirm();
getBindCardList();
createLoan();
externalQuotaOrderAuditNotify();
modifyContactStatus();
Thread.sleep(10000);
// 放款
loginOP();
checkWaitingFundingCorpOperatePeople();
modifyWaitingFundingCreatedAt();
Thread.sleep(10000);
fundsPlanLoanApply();
Thread.sleep(10000);
payNotify();
}
}
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