<?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.hotent.uc.dao.ElectronicSealDao">
	<resultMap id="ElectronicSeal" type="com.hotent.uc.model.ElectronicSeal">
		<id property="id" column="ID_" jdbcType="VARCHAR"/>
		<result property="userId" column="USER_ID_" jdbcType="VARCHAR"/>
		<result property="fileId" column="FILE_ID_" jdbcType="VARCHAR"/>
		<result property="password" column="PASSWORD_" jdbcType="VARCHAR"/>
		<result property="isUse" column="IS_USE_" jdbcType="NUMERIC"/>
		<result property="createTime" column="CREATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="updateTime" column="UPDATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="createOrgId" column="CREATE_ORG_ID_" jdbcType="VARCHAR"/>
		<result property="createBy" column="CREATE_BY_" jdbcType="VARCHAR"/>
		<result property="updateBy" column="UPDATE_BY_" jdbcType="VARCHAR"/>
	</resultMap>
	
	<insert id="insertBatch" parameterType="java.util.List">
		INSERT INTO uc_electronic_seal
		(
			ID_,USER_ID_,FILE_ID_,PASSWORD_,IS_USE_,CREATE_TIME_,UPDATE_TIME_,CREATE_ORG_ID_,CREATE_BY_,UPDATE_BY_
		) 
		VALUES 
		<foreach collection="list" item="item" index="index" separator=",">
			(#{item.id,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR}, #{item.fileId,jdbcType=VARCHAR}, #{item.password,jdbcType=VARCHAR},
	        #{item.isUse,jdbcType=NUMERIC}, #{item.createTime,jdbcType=TIMESTAMP},#{item.updateTime,jdbcType=TIMESTAMP},#{item.createOrgId,jdbcType=VARCHAR},#{item.createBy,jdbcType=VARCHAR},#{item.updateBy,jdbcType=VARCHAR})
		</foreach>
	</insert>
	
	<insert id="insertBatch" databaseId="oracle" parameterType="java.util.List">
		INSERT INTO uc_electronic_seal
		(
			ID_,USER_ID_,FILE_ID_,PASSWORD_,IS_USE_,CREATE_TIME_,UPDATE_TIME_,CREATE_ORG_ID_,CREATE_BY_,UPDATE_BY_
		) 
		(
		<foreach collection="list" item="item" index="index" separator="union all">
			select #{item.id,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR}, #{item.fileId,jdbcType=VARCHAR}, #{item.password,jdbcType=VARCHAR},
	        #{item.isUse,jdbcType=NUMERIC}, #{item.createTime,jdbcType=TIMESTAMP},#{item.updateTime,jdbcType=TIMESTAMP},#{item.createOrgId,jdbcType=VARCHAR},#{item.createBy,jdbcType=VARCHAR},#{item.updateBy,jdbcType=VARCHAR} FROM DUAL
		</foreach>
		)
	</insert>
</mapper>