mapper.Mapper2.xml Maven / Gradle / Ivy
<?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="test.test.db2.AutoMapperTestTable2"> <select id="mybatisInsertBatchPG" resultType="test.test.auto.dao.DOTestTable"> INSERT INTO test_table ( a_int,a_decimal,a_varchar,a_text,a_byte,a_time,a_date,a_boolean,a_uuid,a_json ) VALUES <foreach collection="list" separator="," item="a"> ( #{a.aInt},#{a.aDecimal },#{a.aVarchar },#{a.aText },#{a.aByte },#{a.aTime },#{a.aDate },#{a.aBoolean },#{a.aUuid },#{a.aJson ,jdbcType = OTHER,typeHandler = jchanghong.autoconfig.db.mybatis.PGJsonTypeHandler } ) </foreach> on conflict do nothing </select> <select id="test" resultType="hashmap"> select * from check_job.public.test_table </select> </mapper>