(List)批量插入SQL模板

<insert id="batchInsert" parameterType="com.lifesea.model.FlowApplyFile" >  insert into flow_apply_file  <trim prefix="(" suffix=")" suffixOverrides="," >    APPLY_ID, FILE_TYPE, FILE_NAME, FILE_SIZE, FILE_PATH, FILE_HASH, `TYPE`, ADD_TIME,    ORDER_BY,  </trim>  values  <foreach collection="list" item="obj" index="index" separator="," >    (    #{obj.applyId,jdbcType=BIGINT},    #{obj.fileType,jdbcType=VARCHAR},    #{obj.fileName,jdbcType=VARCHAR},    #{obj.fileSize,jdbcType=VARCHAR},    #{obj.filePath,jdbcType=VARCHAR},    #{obj.fileHash,jdbcType=VARCHAR},    #{obj.type,jdbcType=VARCHAR},    #{obj.addTime,jdbcType=TIMESTAMP},    #{obj.orderBy,jdbcType=INTEGER})  </foreach></insert>
相關文章
相關標籤/搜索