Commit 86b0e9bb authored by 陈宏杰's avatar 陈宏杰

批量插入

parent ab0bc5dc
...@@ -72,7 +72,7 @@ public class BaiHangFileReportService { ...@@ -72,7 +72,7 @@ public class BaiHangFileReportService {
private static final String HOST_PATH = "/home/quant_group/reportFile/"; private static final String HOST_PATH = "/home/quant_group/reportFile/";
// private static final String HOST_PATH = "C:\\Users\\musterHunter\\Desktop\\TEST_REPORT\\"; // private static final String HOST_PATH = "C:\\Users\\musterHunter\\Desktop\\TEST_REPORT\\";
private static final Integer A1_INITIAL_CAPACITY = 6000; private static final Integer A1_INITIAL_CAPACITY = 5000;
private static final Integer D2_INITIAL_CAPACITY = 5000; private static final Integer D2_INITIAL_CAPACITY = 5000;
...@@ -258,6 +258,7 @@ public class BaiHangFileReportService { ...@@ -258,6 +258,7 @@ public class BaiHangFileReportService {
private String reportA1Refuse(String starTime, String endTime){ private String reportA1Refuse(String starTime, String endTime){
String encryptFileName = null; String encryptFileName = null;
List<ApplyLoanInfoZhuDai> recordList = new ArrayList<>(A1_INITIAL_CAPACITY);
List<ApplyLoanInfoZhuDai> zhuDaiLogList = null,applyLoanInfos = null; List<ApplyLoanInfoZhuDai> zhuDaiLogList = null,applyLoanInfos = null;
List<String> reportList = new ArrayList<>(); List<String> reportList = new ArrayList<>();
try { try {
...@@ -284,7 +285,12 @@ public class BaiHangFileReportService { ...@@ -284,7 +285,12 @@ public class BaiHangFileReportService {
record = new ApplyLoanInfoZhuDai(); record = new ApplyLoanInfoZhuDai();
BeanUtils.copyProperties(applyLoanInfo, record); BeanUtils.copyProperties(applyLoanInfo, record);
record.setRecordId(UUID.randomUUID().toString().replaceAll("-", "")); record.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
applyLoanInfoZhuDaiMapper.saveApplyLoanInfoZhuDaiLog(record); recordList.add(record);
if (recordList.size() >= A1_INITIAL_CAPACITY) {
saveApplyLoanInfoZhuDai(recordList,starTime,endTime);
clear(recordList);
recordList = new ArrayList<>(A1_INITIAL_CAPACITY);
}
} catch (Exception e) { } catch (Exception e) {
log.error("量化派助贷TO百行报送(A1Refuse)-贷款申请信息保存记录失败", e); log.error("量化派助贷TO百行报送(A1Refuse)-贷款申请信息保存记录失败", e);
} }
......
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