<?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)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})
|
</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>
|