教育训练处考试制证系统后端
heheng
2025-05-19 3a762add44449332d6d379e361698850f6066e16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<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,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.businessId},#{attachment.remark})
    </foreach>
  </insert>
  <update id="updateBusinessIdBatch">
      <foreach collection="attachmentList" item="attachment" separator=";">
          update attachment
          set
              business_id = #{attachment.businessId}
          where id = #{attachment.id}
      </foreach>
  </update>
    <update id="deleteByBusinessId">
        update attachment
        set
            del_flag = 1
        where business_id = #{businessId}
    </update>
</mapper>