From daffc63ee000f6de9dabc356057b3d00a2d71d83 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Thu, 12 Oct 2023 12:54:57 +0800
Subject: [PATCH] 增加pro配置文件
---
ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java b/ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java
index 1272e43..7db9141 100644
--- a/ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java
+++ b/ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java
@@ -243,8 +243,8 @@
attachmentInfo.setFileSize(file.getSize());
attachmentInfo.setModule(module);
attachmentInfo.setFileType(getType(suffix));
- /* attachmentInfo.setCreateBy(SecurityUtils.getUsername());
- attachmentInfo.setUpdateBy(SecurityUtils.getUsername());*/
+ attachmentInfo.setCreateBy(SecurityUtils.getUsername());
+ attachmentInfo.setUpdateBy(SecurityUtils.getUsername());
attachmentInfo.setUpdateTime(new Date());
attachmentInfo.setCreateTime(new Date());
attachmentInfoList.add(attachmentInfo);
@@ -325,8 +325,8 @@
attachmentInfo.setFileSize(file.getSize());
attachmentInfo.setModule(module);
attachmentInfo.setFileType(getType(suffix));
- /* attachmentInfo.setCreateBy(SecurityUtils.getUsername());
- attachmentInfo.setUpdateBy(SecurityUtils.getUsername());*/
+ attachmentInfo.setCreateBy(SecurityUtils.getUsername());
+ attachmentInfo.setUpdateBy(SecurityUtils.getUsername());
attachmentInfo.setUpdateTime(new Date());
attachmentInfo.setCreateTime(new Date());
attachmentInfoList.add(attachmentInfo);
@@ -401,4 +401,11 @@
throw new ServiceException("文件不存在");
}
}
+
+ @Override
+ public void updateBatchById(List<AttachmentInfo> attachmentInfo) {
+ boolean saveBatch = attachmentInfoService.updateBatchById(attachmentInfo);
+ if (!saveBatch)
+ throw new ServiceException("文件批量保存失败");
+ }
}
--
Gitblit v1.9.2