From f210a7a25559d4452ccc4da2c49a51834e2472f1 Mon Sep 17 00:00:00 2001 From: huangzhen <867217663@qq.com> Date: 星期三, 13 九月 2023 15:15:07 +0800 Subject: [PATCH] 批量插入图片xml增加业务id、remark字段 --- ruoyi-file/src/main/java/com/ruoyi/file/service/impl/AttachmentServiceImpl.java | 8 ++++---- ruoyi-file/src/main/resources/mapper/AttachmentInfoMapper.xml | 4 ++-- 2 files changed, 6 insertions(+), 6 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..91ce116 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); diff --git a/ruoyi-file/src/main/resources/mapper/AttachmentInfoMapper.xml b/ruoyi-file/src/main/resources/mapper/AttachmentInfoMapper.xml index 8d0e049..4e69b19 100644 --- a/ruoyi-file/src/main/resources/mapper/AttachmentInfoMapper.xml +++ b/ruoyi-file/src/main/resources/mapper/AttachmentInfoMapper.xml @@ -3,11 +3,11 @@ <mapper namespace="com.ruoyi.file.mapper.AttachmentInfoMapper" > <insert id="saveBatch" useGeneratedKeys="true" keyProperty="id" > insert into attachment (file_key,file_path,file_url,file_name,file_suffix,file_desc,file_size,file_type,module,del_flag - ,create_by,create_time,update_by,update_time)values + ,create_by,create_time,update_by,update_time,business_id,remark)values <foreach collection="attachmentList" item="attachment" separator=","> (#{attachment.fileKey},#{attachment.filePath},#{attachment.fileUrl},#{attachment.fileName},#{attachment.fileSuffix},#{attachment.fileDesc}, #{attachment.fileSize},#{attachment.fileType},#{attachment.module},#{attachment.delFlag},#{attachment.createBy}, - #{attachment.createTime},#{attachment.updateBy},#{attachment.updateTime}) + #{attachment.createTime},#{attachment.updateBy},#{attachment.updateTime},#{attachment.businessId},#{attachment.remark}) </foreach> </insert> <update id="updateBusinessIdBatch"> -- Gitblit v1.9.2