From 6c235963d6fc46b38ea59d9b19c6519b892e080b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 16 May 2022 09:42:06 +0800
Subject: [PATCH] 20220516 逻辑删除,更新字段IS_Delete字段为已删除,默认为空,删除后其余信息从查询中过滤了
---
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
index a8f8c09..a3883d9 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -234,6 +234,8 @@
}
+ @Value("${file_storage_path}")
+ private String fileStoragePath;
@@ -244,10 +246,17 @@
String fileName = file.getOriginalFilename();
// String dirPath = "E:";
- String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH);
+ String dirPath = fileStoragePath;
- File saveFile = new File(dirPath + "/" + fileName);
- file.transferTo(saveFile);
+ File saveFile =new File (new File(dirPath).getAbsolutePath() + File.separator + fileName);
+ if (!saveFile.exists())
+ {
+ if (!saveFile.getParentFile().exists())
+ {
+ saveFile.getParentFile().mkdirs();
+ }
+ }
+ file.transferTo(saveFile.getAbsoluteFile());
SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
--
Gitblit v1.9.1