Commit ec0f543c authored by yanzg's avatar yanzg

下载视频

parent 41dffba8
......@@ -133,6 +133,24 @@ public class YzgExcelService {
HttpFileHelper.localToDown(serverPath, load.getFileName() + ".xlsx", response);
}
/**
* 删除文件
*
* @param req
*/
public void remove(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()) {
file.delete();
}
fileDao.remove(req);
}
private String getServerPath(YzgFileVo load) {
Date date = DateHelper.getDateTime(load.getCreateDate());
// 获取临时文件路径
......
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