mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-03-11 03:06:53 +08:00
Compare commits
3 Commits
661e8cf7b4
...
8c122a9609
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c122a9609 | ||
|
|
de1dbe61a5 | ||
|
|
156471d638 |
2
pom.xml
2
pom.xml
@@ -28,7 +28,7 @@
|
|||||||
<dynamic-ds.version>4.3.1</dynamic-ds.version>
|
<dynamic-ds.version>4.3.1</dynamic-ds.version>
|
||||||
<commons.io.version>2.21.0</commons.io.version>
|
<commons.io.version>2.21.0</commons.io.version>
|
||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<fastjson.version>2.0.60</fastjson.version>
|
<fastjson.version>2.0.61</fastjson.version>
|
||||||
<jjwt.version>0.9.1</jjwt.version>
|
<jjwt.version>0.9.1</jjwt.version>
|
||||||
<minio.version>8.2.2</minio.version>
|
<minio.version>8.2.2</minio.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class SecurityContextHolder
|
|||||||
|
|
||||||
public static Long getUserId()
|
public static Long getUserId()
|
||||||
{
|
{
|
||||||
return Convert.toLong(get(SecurityConstants.DETAILS_USER_ID), 0L);
|
return Convert.toLong(get(SecurityConstants.DETAILS_USER_ID), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setUserId(String account)
|
public static void setUserId(String account)
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ public class ExcelUtil<T>
|
|||||||
|
|
||||||
public static final String[] FORMULA_STR = { "=", "-", "+", "@" };
|
public static final String[] FORMULA_STR = { "=", "-", "+", "@" };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元格样式缓存
|
||||||
|
*/
|
||||||
|
private Map<String, CellStyle> cellStyleCache = new HashMap<String, CellStyle>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel sheet最大行数,默认65536
|
* Excel sheet最大行数,默认65536
|
||||||
*/
|
*/
|
||||||
@@ -1042,9 +1047,16 @@ public class ExcelUtil<T>
|
|||||||
*/
|
*/
|
||||||
private CellStyle createCellStyle(CellStyle cellStyle, String format)
|
private CellStyle createCellStyle(CellStyle cellStyle, String format)
|
||||||
{
|
{
|
||||||
|
String key = cellStyle.getIndex() + "|" + format;
|
||||||
|
CellStyle cached = cellStyleCache.get(key);
|
||||||
|
if (cached != null)
|
||||||
|
{
|
||||||
|
return cached;
|
||||||
|
}
|
||||||
CellStyle style = wb.createCellStyle();
|
CellStyle style = wb.createCellStyle();
|
||||||
style.cloneStyleFrom(cellStyle);
|
style.cloneStyleFrom(cellStyle);
|
||||||
style.setDataFormat(wb.getCreationHelper().createDataFormat().getFormat(format));
|
style.setDataFormat(wb.getCreationHelper().createDataFormat().getFormat(format));
|
||||||
|
cellStyleCache.put(key, style);
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user