Commit 7af57e87 authored by 郝彦辉's avatar 郝彦辉

非联合贷-实时数据报送sql修改

parent 0dab96e7
......@@ -420,7 +420,7 @@ public class BaiHangZhuDaiService {
log.info("百行征信助贷模式报送放款数据单个数据, {}", JSON.toJSONString(loanInfozd_tmp));
String loanInfoReqId = loanInfozd_tmp.getReqID();
if(loanInfozd_tmp.getTotalTerm() > 1){
if(loanInfozd_tmp.getTotalTerm() > 1){
List<String> targetRepaymentDayList = loanInfoMapper.findTargetRepaymentDayList(loanInfoReqId);
loanInfozd_tmp.setTargetRepayDateList(String.join(",", targetRepaymentDayList));
}
......@@ -428,7 +428,6 @@ public class BaiHangZhuDaiService {
/*try{
loanInfoDbMapper.saveLoanInfoRecordLog(loanInfo);
}catch(Exception e){}*/
try{
LoanInfo record = new LoanInfo();
BeanUtils.copyProperties(loanInfozd_tmp, record);
......@@ -487,7 +486,6 @@ public class BaiHangZhuDaiService {
}
repaymentLoanInfo.setReqID(repaymentLoanInfo.getRecordId());
repaymentLoanInfo.setRecordId(null);*/
try {
RepaymentLoanInfo record = new RepaymentLoanInfo();
BeanUtils.copyProperties(repaymentLoanInfo, record);
......@@ -857,7 +855,7 @@ public class BaiHangZhuDaiService {
//文件方式上报的客户端代码(加密)
public static void fileUploadClient() throws Exception {
//RSA公钥文件路径(百行提供公钥文件)
String RSA_PUBLIC_KEY = "D:\\Project1\\work_new\\baihang-report\\src\\main\\resources\\manualTool\\rsa_public_key.pem";
String RSA_PUBLIC_KEY = "/manualTool/rsa_public_key.pem";
//AES密钥(机构自行设置)
String AES_KEY = "fc4c1cbca5a46840f60";
......@@ -874,9 +872,9 @@ public class BaiHangZhuDaiService {
//执行压缩加密操作
FileUploadResponse response = client.execute(req);
if (response.isSuccess) {
System.out.println("zip And encrypt success;fileName = " + response.getEncryptFilePath() + response.getEncryptFileName());
log.info("zip And encrypt success;fileName = " + response.getEncryptFilePath() + response.getEncryptFileName());
} else {
System.out.println("zip And encrypt fail;errorMessage = " + response.getErrorMessage());
log.info("zip And encrypt fail;errorMessage = " + response.getErrorMessage());
}
}
......@@ -884,12 +882,12 @@ public class BaiHangZhuDaiService {
public static void fileUploadValidationClient() throws Exception {
//RSA私钥文件路径(百行提供测试环境私钥文件)
////String RSA_PRIVATE_KEY = "/baihang/rsa_private_key.pem";
String RSA_PRIVATE_KEY = "D:\\Project1\\work_new\\baihang-report\\src\\main\\resources\\manualTool\\rsa_private_key.pem";
String RSA_PRIVATE_KEY = "/manualTool/rsa_private_key.pem";
FileUploadValidationRequest req = new FileUploadValidationRequest();
//设置压缩加密后的数据文件路径
req.setDataFile("D:\\BaiHangZhuDai\\test2\\cry\\zhudai_20170209_20170309_0001.cry");
req.setTargetFilePath("D:\\BaiHangZhuDai\\test2\\cry2txt");
req.setDataFile("C:\\Users\\Administrator\\Desktop\\测试\\文件测试\\baihang\\all_data.cry");
req.setTargetFilePath("C:\\Users\\Administrator\\Desktop\\测试\\文件测试\\baihang\\out\\");
BhFileCreditApiClient client = new BhFileCreditApiClient();
//初始化设置RSA私钥
......@@ -897,9 +895,9 @@ public class BaiHangZhuDaiService {
//执行解密解压操作
FileUploadValidationResponse response = client.execute(req);
if (response.isSuccess) {
System.out.println("decrypt And unzip success;fileName = " + response.getDecryptFilePath() + response.getDecryptFileName());
log.info("decrypt And unzip success;fileName = " + response.getDecryptFilePath() + response.getDecryptFileName());
} else {
System.out.println("decrypt And unzip fail;errorMessage = " + response.getErrorMessage());
log.info("decrypt And unzip fail;errorMessage = " + response.getErrorMessage());
}
}
......
......@@ -416,12 +416,12 @@ public class ManualToolService implements CommonSuperService {
for (String line = br.readLine(); line != null; line = br.readLine()) {
line = line.trim();
if (!inKey) {
if (line.contains("BEGIN PUBLIC KEY")) {
if (line.contains("BEGIN PRIVATE KEY")) {
inKey = true;
}
continue;
} else {
if (line.contains("END PUBLIC KEY")) {
if (line.contains("END PRIVATE KEY")) {
inKey = false;
break;
}
......@@ -646,8 +646,8 @@ public class ManualToolService implements CommonSuperService {
System.out.println(id);
}*/
int rr = 9821585;
List<String> lineList = ReadOrWriteTxt.readTxtList("C:\\Users\\Administrator\\Desktop\\测试\\文件测试\\baihang\\d3d3.txt");
int rr = 1009821800;
List<String> lineList = ReadOrWriteTxt.readTxtList("C:\\Users\\Administrator\\Desktop\\测试\\接口测试\\build\\tmp3.txt");
for(int i=0;i<lineList.size();i++){
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(lineList.get(i), new TypeToken<RepaymentInfoZhuDai>(){}.getType());
//String id = UUID.randomUUID().toString().replaceAll("-", "");
......@@ -655,6 +655,7 @@ public class ManualToolService implements CommonSuperService {
repaymentLoanInfo.setReqID(rr+"");
System.out.println(JSON.toJSONString(repaymentLoanInfo));
}
System.err.println(rr);
......
-----BEGIN PUBLIC KEY-----
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMl14FDREBF9aP7dAmmRxT9t7r5oYkODVMKT59LMc4g3ww51pP9FxVBGN6HGrGIuav6ePMBKygfyvN/Pa54sJetj9dpQMpifdIjlW5WjAwn1Uug6T1r7R61f9NZqT5NaGH8f24ZnrePKurdN5dfYE8qM+XFik8ZJdY3a2V1w7XqjAgMBAAECgYByRpoaXaymryO6xjUTGyvvIfW2LlHnB/0xbmKm0XCLiU3sytDwOGyHb30pGCA6hSgODEZbsVDOl2OJ9QePrm1HCiAocXimkghPsOnCQ7ZIDKQG7DSAoJya0FVAzkygEBCX/deZqXGMvLSjFnsskZEJkr3Gj+WWMIFNE8RsHwmjwQJBAOrdaPgYsy4BJ+EyiaqKTQ3ibuOYKyrV6PbpKQlVLgO4aFFUNh8uvf3Gh51CCIZ/7tSvBAxxTJ5z5+zkMrbUmSECQQDblu1iM+mgF76GQQ7oZurtEmVMQJWX+0xnAb1DBsLgdngmMA2ff1GOAM91mDL5CR45DmBEt9NnQxXKeAksaYdDAkBeM3wctlt3wkLqkkihPGN3hDCR3MDDp5SPJCmvcpjIKTi+Fha3HxpZJT3Tl16wA7QZXjEzhGYEz9xgKY8lwdPBAkEApWj4YgwGxUB9lTX2m9vCxVghFCJmTTjQIZuuzImQTHMRKHr0GBxY+6XioItIgk17BbGtlLYAOf3PsVdgWaMYbwJAGOU8tGn2xuIZq/YQ/8jKQyzMyyFUtoGDBjEZ+h0d7joDnEMcwSzwpIB5TkYo7i5Z9Vnl2E/fApanI7RCyclVBw==
-----END PUBLIC KEY-----
\ No newline at end of file
-----END PRIVATE KEY-----
\ No newline at end of file
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