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.gk.hotwork.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_uid,create_uname,create_time,update_uid,update_uname,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.createUid},#{attachment.createUname},
| #{attachment.createTime},#{attachment.updateUid},#{attachment.updateUname},#{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>
|
|