|
|
|
@ -25,7 +25,7 @@ public class RasaFileServiceImpl implements RasaFileService {
|
|
|
|
|
private String rasaFileName;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void saveRasaFile(MultipartFile file) throws Exception {
|
|
|
|
|
public void saveRasaFile(MultipartFile file) throws IOException {
|
|
|
|
|
|
|
|
|
|
//初始化目录
|
|
|
|
|
File dir = new File(rasaFilePath);
|
|
|
|
@ -58,9 +58,9 @@ public class RasaFileServiceImpl implements RasaFileService {
|
|
|
|
|
// 恢复文件
|
|
|
|
|
File backFile = new File(rasaBackFullPath);
|
|
|
|
|
if (backFile.exists()){ //恢复文件
|
|
|
|
|
FileUtil.rename(oldFile,rasaFullPath,true);
|
|
|
|
|
FileUtil.rename(backFile,rasaFileName,true);
|
|
|
|
|
}
|
|
|
|
|
throw new Exception(e);
|
|
|
|
|
throw new IOException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|