|
|
@@ -8,6 +8,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|
|
import org.springframework.core.io.Resource;
|
|
|
import org.springframework.core.io.support.LocalizedResourceHelper;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.servlet.support.RequestContextUtils;
|
|
|
import org.springframework.web.servlet.view.document.AbstractExcelView;
|
|
|
|
|
|
@@ -87,7 +88,11 @@ public class JxlsExcelView extends AbstractExcelView {
|
|
|
}
|
|
|
|
|
|
public Export() {
|
|
|
- this.user = SystemSession.getUser().getUserName();
|
|
|
+ if (StringUtils.isEmpty(SystemSession.getUser())) {
|
|
|
+ this.user = "游客";
|
|
|
+ } else {
|
|
|
+ this.user = SystemSession.getUser().getUserName();
|
|
|
+ }
|
|
|
this.date = DateFormatUtils.DATETIME_FORMAT.format(new Date());
|
|
|
}
|
|
|
}
|