From 7622067c3818c8981c42541a50cd510c7d421db0 Mon Sep 17 00:00:00 2001 From: zhangqiyang <1066386929@qq.com> Date: Sun, 7 Apr 2024 15:05:38 +0800 Subject: [PATCH] Configure Continuous Integration .... --- .../com/system/log/service/LogService.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/system/log/service/LogService.java b/src/main/java/com/system/log/service/LogService.java index d563e33..99b8b57 100644 --- a/src/main/java/com/system/log/service/LogService.java +++ b/src/main/java/com/system/log/service/LogService.java @@ -387,7 +387,7 @@ public class LogService { selectResult.add(logEntity); } } - //Object jsonObject = JSONObject.toJSON(selectResult); + // Object jsonObject = JSONObject.toJSON(selectResult); return exportLogExcelZip(selectResult, password); } @@ -409,17 +409,17 @@ public class LogService { return date.getTime(); } - //导出为Excel类型 + // 导出为Excel类型 public File exportLogExcelZip(List selectResult, String password) throws IOException { - //创建一个工作簿,也就是Excel文件 + // 创建一个工作簿,也就是Excel文件 HSSFWorkbook wb = new HSSFWorkbook(); - //创建一个工作表 + // 创建一个工作表 HSSFSheet sheet = wb.createSheet(); - //第一行,标题 + // 第一行,标题 HSSFRow row0 = sheet.createRow(0); HSSFCell cell0 = row0.createCell(0); cell0.setCellValue("操作日志表"); - //第二行,表头 + // 第二行,表头 HSSFRow row1 = sheet.createRow(1); row1.createCell(0).setCellValue("id"); row1.createCell(1).setCellValue("address"); @@ -438,7 +438,7 @@ public class LogService { row1.createCell(14).setCellValue("userAuthDesc"); row1.createCell(15).setCellValue("userId"); - //向表中写入数据 + // 向表中写入数据 int rowInt = 2; for (LogEntity logEntity : selectResult) { HSSFRow row = sheet.createRow(rowInt++); @@ -462,8 +462,8 @@ public class LogService { } FileOutputStream fos = null; try { - //输出文件,创建字节输出流 - File tempFile = new File(File.createTempFile("log", ".xlsx").getPath()); + // 输出文件,创建字节输出流 + File tempFile = new File(File.createTempFile("log", ".xls").getPath()); fos = new FileOutputStream(tempFile); wb.write(fos); fos.flush();