pqbug解决
This commit is contained in:
@@ -129,8 +129,8 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
||||
aa.le("sys_user_log.update_time", endTime);
|
||||
String nowTime = date + "至" + endTime;
|
||||
//必须放到循环外,否则会刷新流
|
||||
ExcelWriter excelWriter = EasyExcel.write(generalInfo.getBusinessTempPath() + "//" + nowTime + ExcelTypeEnum.CSV.getValue(), UserLogExcel.class)
|
||||
.excelType(ExcelTypeEnum.CSV)
|
||||
ExcelWriter excelWriter = EasyExcel.write(generalInfo.getBusinessTempPath() + "//" + nowTime + ExcelTypeEnum.XLSX.getValue(), UserLogExcel.class)
|
||||
// .excelType(ExcelTypeEnum.CSV)
|
||||
.build();
|
||||
|
||||
try {
|
||||
@@ -201,7 +201,7 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
||||
try {
|
||||
in = new FileInputStream(newFile);
|
||||
String name = newFile.getName();
|
||||
String[] split = name.split(ExcelTypeEnum.CSV.getValue());
|
||||
String[] split = name.split(ExcelTypeEnum.XLSX.getValue());
|
||||
|
||||
String[] splitTime = split[0].split("至");
|
||||
if (StrUtil.isBlank(splitTime[0]) || StrUtil.isBlank(splitTime[1])) {
|
||||
@@ -212,7 +212,7 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
||||
.le(UserLog::getCreateTime, splitTime[1].replace("_", ":"));
|
||||
this.remove(le);
|
||||
EasyExcel.read(newFile, UserLogExcel.class, new DemoDataListener(this.getBaseMapper()))
|
||||
.excelType(ExcelTypeEnum.CSV).doReadAll();
|
||||
.excelType(ExcelTypeEnum.XLSX).doReadAll();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user