Commit 4a830936 authored by yanzg's avatar yanzg

下载视频

parent 93288640
......@@ -130,7 +130,25 @@ public class YzgExcelService {
load.setDownloadDate(DateHelper.getNow());
load.setDownloadUserId(downloadUserId);
fileDao.update(load);
HttpFileHelper.localToDown(serverPath, load.getFileName() + ".xlsx", response);
HttpFileHelper.localToDown(serverPath, load.getFileName(), response);
}
/**
* 下载文件
*
* @param req
*/
public YzgFileVo load(YzgFileDownloadReqVo req) {
YzgFileVo load = fileDao.load(req, YzgFileVo.class);
if (load == null) {
throw new CodeException("文件不存在或者已经删除");
}
String serverPath = getServerPath(load);
File file = new File(serverPath);
if (!file.exists()) {
throw new CodeException("文件不存在或者已经删除");
}
return load;
}
/**
......
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