Skip to content

Commit f9115b8

Browse files
committed
增加一个直接保存List的静态方法
1 parent 4893070 commit f9115b8

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

ExcelReads.jar

449 Bytes
Binary file not shown.

src/main/java/seven/ExcelFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public static SaveExcel saveExcel(List<? extends Object> bean) throws Exception
7878
throw new Exception("请传入数据");
7979
}
8080
if (bean.get(0) instanceof Map) {
81-
return new ResExprotMap((List<Map>) bean);
81+
return new ResExportMap((List<Map>) bean);
8282
}
83-
return new ResExprotObj((List)bean);
83+
return new ResExportObj((List)bean);
8484
}
8585

8686

src/main/java/seven/savewapper/wapperRef/sysWppers/ResExportMap.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
* Created by seven on 2016/11/30.
3030
*/
3131
public class ResExportMap extends SaveExcelObject<Map> {
32+
33+
public ResExportMap(List<Map> list) {
34+
super(list);
35+
}
36+
3237
public ResExportMap(List<Map> list, String path) {
3338
super(list, path);
3439
}
@@ -40,9 +45,8 @@ public ResExportMap(ResultSet resultSet, String path) {
4045
public ResExportMap(ResultSet resultSet) {
4146
super(resultSet);
4247
}
43-
public ResExprotMap(List<Map> list) {
44-
super(list);
45-
}
48+
49+
4650

4751

4852
@Override

0 commit comments

Comments
 (0)