From 70dcf4e610a0ec5fd6ca2c3daf9edf4957b30529 Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期二, 25 二月 2025 16:34: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