Commit 31cb0e53 authored by yanzg's avatar yanzg

修复Excel文件下载

parent 81f94227
......@@ -56,11 +56,12 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
* @param downFileName 下载文件名
*/
public boolean down(HttpServletResponse response, String downFileName) throws IOException {
ExportData config = this.getConfig();
if (StringHelper.isEmpty(downFileName)) {
downFileName = this.getConfig().getDownFileName();
downFileName = config.getDownFileName();
}
if (StringHelper.isEmpty(downFileName)) {
downFileName = this.getConfig().getFileName();
downFileName = config.getFileName();
}
// 正式文件
String fileName = this.getFileName();
......@@ -80,7 +81,7 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
// 返回文件名和生成的文件大小
// 假如连续1分钟返回文件大小为0,则说明性能存在问题,或者是其他线程已经删除文件
ExportTempRes res = new ExportTempRes();
res.setFileName(fileName);
res.setFileName(config.getFileName());
res.setSize(fileTemp.length());
res.setRow(StringHelper.toLong(FileHelper.readFile(fileRow, "utf-8")));
// 输出结果
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment