StudentDetailMapper.xml 1.46 KB
<?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.jevon.mapper.StudentDetailMapper" >
  <resultMap id="BaseResultMap" type="com.jevon.model.StudentDetail" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="open_id" property="analyseId" jdbcType="INTEGER" />
    <result column="school_name" property="schoolName" jdbcType="VARCHAR" />
    <result column="class_name" property="className" jdbcType="VARCHAR" />
    <result column="student_name" property="studentName" jdbcType="VARCHAR" />
    <result column="student_number" property="studentNumber" jdbcType="VARCHAR" />
    <result column="analyse_id" property="analyseId" jdbcType="INTEGER" />
    <result column="exam_number" property="examNumber" jdbcType="VARCHAR" />
    <result column="score" property="score" jdbcType="FLOAT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>

  <insert id="insertBatch" parameterType="java.util.List">
    insert into sz_learn_student_detail (school_name, class_name,student_name,
    student_number,analyse_id,exam_number,score,create_time)
    values
     <foreach collection="list" item="emp" separator=",">
       (#{emp.schoolName},#{emp.className},#{emp.studentName},
       #{emp.studentNumber},#{emp.analyseId},#{emp.examNumber},#{emp.score},#{emp.createTime})
     </foreach>
  </insert>
</mapper>