<?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="MyMapper">
  <select id="selectPerson" resultType="com.cesgroup.mybatisHomework.entity.Person">
      select * from mybatis where id = #{id}
   </select>
  <insert id="insert" parameterType="com.cesgroup.mybatisHomework.entity.Person">
    INSERT INTO mybatis (id, name, info) VALUES(#{id}, #{name}, #{info})
</insert>
  <insert id="insertBatch">
    INSERT INTO mybatis (id, name, info)
    VALUES
    <foreach collection="list" item="person" separator=",">
      (#{person.id}, #{person.name}, #{person.info})
    </foreach>
  </insert>
</mapper>