|
|
@ -68,12 +68,12 @@ public class SysFileServiceImpl implements SysFileService { |
|
|
String newFileName = RandomUtil.getOrderNoByAtomic1("file") + suffix; |
|
|
String newFileName = RandomUtil.getOrderNoByAtomic1("file") + suffix; |
|
|
String basePath = filePath; |
|
|
String basePath = filePath; |
|
|
String baseDatePath = DateUtils.format(new Date()); |
|
|
String baseDatePath = DateUtils.format(new Date()); |
|
|
File baseFilePath = new File(basePath + "/" + baseDatePath + "/" + inData.getFolder()); |
|
|
|
|
|
|
|
|
File baseFilePath = new File(basePath + "\\" + baseDatePath + "\\" + inData.getFolder()); |
|
|
if (!baseFilePath.exists()) { |
|
|
if (!baseFilePath.exists()) { |
|
|
baseFilePath.mkdirs(); |
|
|
baseFilePath.mkdirs(); |
|
|
} |
|
|
} |
|
|
// 最终的目录 |
|
|
// 最终的目录 |
|
|
String finalFileName = baseFilePath.getPath()+"/" + newFileName; |
|
|
|
|
|
|
|
|
String finalFileName = baseFilePath.getPath()+"\\" + newFileName; |
|
|
try { |
|
|
try { |
|
|
baseFilePath = multipartFileToFile(file, finalFileName); |
|
|
baseFilePath = multipartFileToFile(file, finalFileName); |
|
|
}catch (Exception e){ |
|
|
}catch (Exception e){ |
|
|
|