教育训练处考试制证系统后端
zhangf
2024-09-11 1a316551c8e46b793904090cfa84781bf77fef2a
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("文件批量保存失败");
    }
}