From 3aae8ddd5b9624626921abdcc33122dccdcd5c61 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期五, 27 十二月 2024 13:24:46 +0800
Subject: [PATCH] 修改学时证书接收接口

---
 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