Blame view

src/main/resources/mapping/AnalyseDetailMapper.xml 2.24 KB
c6a8c409   陈杰   试卷导入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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.AnalyseDetailMapper" >
  <resultMap id="BaseResultMap" type="com.jevon.model.AnalyseDetail" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="analyse_id" property="analyseId" jdbcType="INTEGER" />
    <result column="question_number" property="questionNumber" jdbcType="VARCHAR" />
    <result column="question_type" property="questionType" jdbcType="INTEGER" />
    <result column="difficult" property="difficult" jdbcType="INTEGER" />
    <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_analyse_detail (analyse_id, question_number,question_type,difficult,score,create_time)
    values
     <foreach collection="list" item="emp" separator=",">
       (#{emp.analyseId},#{emp.questionNumber},#{emp.questionType},#{emp.difficult},#{emp.score},#{emp.createTime})
     </foreach>
  </insert>
e6e6895d   陈杰   学科考试概况
21
22
23
24

  <select id="selectByAnalyseId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select * from sz_learn_analyse_detail where analyse_id = #{analyseId} order by id
  </select>
b543a2f7   陈杰   四维诊断
25
26
27
28
29

  <select id="selectDifficult" parameterType="com.jevon.model.AnalyseDetail" resultType="java.lang.Double">
    select sum(score) from sz_learn_analyse_detail where analyse_id = #{analyseId} and difficult =#{difficult}
  </select>

5cba275e   陈杰   个人学情
30
31
32
33
  <select id="selectDifficultDetail" parameterType="com.jevon.model.AnalyseDetail" resultMap="BaseResultMap">
    select * from sz_learn_analyse_detail where analyse_id = #{analyseId} and difficult =#{difficult}
  </select>

b543a2f7   陈杰   四维诊断
34
35
36
37
38
  <select id="selectQuestionType" parameterType="java.lang.Integer" resultType="java.lang.String">
    select DISTINCT question_type from sz_learn_analyse_detail where analyse_id = #{analyseId}
  </select>

  <select id="selectSumType" parameterType="com.jevon.model.AnalyseDetail" resultType="java.lang.Double">
87ec6d46   陈杰   第一章信息
39
40
41
    select sum(score) from sz_learn_analyse_detail where analyse_id = #{analyseId} and question_type =#{questionType}
  </select>
</mapper>
b543a2f7   陈杰   四维诊断

5cba275e   陈杰   个人学情

c6a8c409   陈杰   试卷导入