Преглед изворни кода

删除多余的style重复赋值

RuoYi пре 3 година
родитељ
комит
62eec4df51

+ 5 - 3
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java

@@ -103,11 +103,13 @@ public class R<T> implements Serializable
103 103
         this.data = data;
104 104
     }
105 105
 
106
-    public Boolean isError() {
106
+    public Boolean isError()
107
+    {
107 108
         return !isSuccess();
108 109
     }
109
-    
110
-    public Boolean isSuccess() {
110
+
111
+    public Boolean isSuccess()
112
+    {
111 113
         return R.SUCCESS == getCode();
112 114
     }
113 115
 }

+ 0 - 2
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java

@@ -681,7 +681,6 @@ public class ExcelUtil<T>
681 681
             if (!headerStyles.containsKey(key))
682 682
             {
683 683
                 CellStyle style = wb.createCellStyle();
684
-                style = wb.createCellStyle();
685 684
                 style.cloneStyleFrom(styles.get("data"));
686 685
                 style.setAlignment(HorizontalAlignment.CENTER);
687 686
                 style.setVerticalAlignment(VerticalAlignment.CENTER);
@@ -715,7 +714,6 @@ public class ExcelUtil<T>
715 714
             if (!styles.containsKey(key))
716 715
             {
717 716
                 CellStyle style = wb.createCellStyle();
718
-                style = wb.createCellStyle();
719 717
                 style.setAlignment(excel.align());
720 718
                 style.setVerticalAlignment(VerticalAlignment.CENTER);
721 719
                 style.setBorderRight(BorderStyle.THIN);