|
|
@@ -156,12 +156,10 @@ public class DataProcess {
|
|
|
SqlSessionUtils.closeSqlSession(sqlSession, GlobalConfigUtils.currentSessionFactory(cls));
|
|
|
}
|
|
|
try {
|
|
|
- // if (cls == EdsMforensics060500.class) {
|
|
|
MybatisMapperProxy<?> mybatisMapperProxy = MybatisUtils.getMybatisMapperProxy(mapper);
|
|
|
MybatisBatch.Method<Object> method = new MybatisBatch.Method<>(mybatisMapperProxy.getMapperInterface());
|
|
|
SqlSessionFactory sqlSessionFactory = MybatisUtils.getSqlSessionFactory(mybatisMapperProxy);
|
|
|
MybatisBatchUtils.execute(sqlSessionFactory, result.getDataList(), method.insert(), Constants.DEFAULT_BATCH_SIZE);
|
|
|
- //}
|
|
|
} catch (Exception e) {
|
|
|
log.error("执行插入语句错误", e);
|
|
|
}
|
|
|
@@ -196,9 +194,6 @@ public class DataProcess {
|
|
|
if (ObjUtil.isNull(field) || StrUtil.isEmpty(fieldValue)) {
|
|
|
continue;
|
|
|
}
|
|
|
- /*if (StrUtil.equals("未知", fieldValue)) {
|
|
|
- System.out.println("12312");
|
|
|
- }*/
|
|
|
//采集编号列统一赋值
|
|
|
if (StrUtil.isNotEmpty(cid) && Eds.CID_FILED_NAME.equals(field.getName())) {
|
|
|
ReflectUtil.setFieldValue(obj, field, cid);
|
|
|
@@ -257,9 +252,6 @@ public class DataProcess {
|
|
|
Field fileField = edsFileFieldInfo.getFileField();
|
|
|
Field deleteStatusField = edsEntityFieldInfo.getDeleteStatusField();
|
|
|
|
|
|
- /* if(cls == EdsMforensics090400.class){
|
|
|
- System.out.println(123);
|
|
|
- }*/
|
|
|
//定位邮件发送时间字段
|
|
|
Field mailSendTimeField = null;
|
|
|
Field[] timeFieldArr = edsEntityFieldInfo.getTimeFieldArr();
|
|
|
@@ -352,10 +344,6 @@ public class DataProcess {
|
|
|
if (filenameField == null || (filename = (String) ReflectUtil.getFieldValue(data, fileField)) == null) {
|
|
|
//以路径末段作为文件名
|
|
|
filename = listPath.getLast();
|
|
|
- /*String[] arr = filePathStr.split(StrUtil.SLASH);
|
|
|
- if (arr.length > 1) {
|
|
|
- filename = arr[arr.length - 1];
|
|
|
- }*/
|
|
|
}
|
|
|
//取扩展名
|
|
|
String extName = StrUtil.emptyToDefault(FileNameUtil.getSuffix(file), FileNameUtil.getSuffix(filename));
|
|
|
@@ -366,7 +354,6 @@ public class DataProcess {
|
|
|
}
|
|
|
fileField.set(data, fileDTO.getUrl());
|
|
|
//组装媒体文件记录
|
|
|
- //String hashcode = DigestUtil.md5Hex(file);
|
|
|
LocalDateTime mailSendTime = mailSendTimeField != null ? (LocalDateTime) mailSendTimeField.get(data) : null;
|
|
|
return EdsMediaFile.builder().collectTargetId(cid).mediaName(filename).mediaSize(file.length()).mediaPath(fileDTO.getPath())
|
|
|
.mediaSmallPath(fileDTO.getUrl()).mediaType(typeCode).deleteStatus(deleteStatus).createTime(createTime)
|