From 62eec4df5194b0eb566a2746f1570c6f8112c2f9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 9 Sep 2022 10:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84st?= =?UTF-8?q?yle=E9=87=8D=E5=A4=8D=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/core/domain/R.java | 8 +++++--- .../java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java index 787a4170..d101d96f 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java @@ -103,11 +103,13 @@ public class R implements Serializable this.data = data; } - public Boolean isError() { + public Boolean isError() + { return !isSuccess(); } - - public Boolean isSuccess() { + + public Boolean isSuccess() + { return R.SUCCESS == getCode(); } } diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index f170010e..681f6cd7 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -681,7 +681,6 @@ public class ExcelUtil if (!headerStyles.containsKey(key)) { CellStyle style = wb.createCellStyle(); - style = wb.createCellStyle(); style.cloneStyleFrom(styles.get("data")); style.setAlignment(HorizontalAlignment.CENTER); style.setVerticalAlignment(VerticalAlignment.CENTER); @@ -715,7 +714,6 @@ public class ExcelUtil if (!styles.containsKey(key)) { CellStyle style = wb.createCellStyle(); - style = wb.createCellStyle(); style.setAlignment(excel.align()); style.setVerticalAlignment(VerticalAlignment.CENTER); style.setBorderRight(BorderStyle.THIN);